<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>†hê §¥§†êm§</title>
	<atom:link href="http://krisindigitalage.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://krisindigitalage.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 12:28:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>capturing environment variables in python</title>
		<link>http://krisindigitalage.com/2012/02/02/capturing-environment-variables-in-python/</link>
		<comments>http://krisindigitalage.com/2012/02/02/capturing-environment-variables-in-python/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 12:28:48 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://krisindigitalage.com/?p=7736</guid>
		<description><![CDATA[capturing environment variables is very useful when one has to do some hacks.. this is a simple bash script which shows all the environment variables when caught from STDIN 12345#!/bin/bash CAPTURE_FILE=/var/log/capture_data env &#62;&#62; ${CAPTURE_FILE} exit 1 Equivalent Python script: 123456789101112131415161718192021222324#!/usr/bin/env python import os import sys def capture&#40;&#41;: &#160; &#160; log = os.environ &#160; &#160; data [...]]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2012/02/02/capturing-environment-variables-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python ftp and get recent file</title>
		<link>http://krisindigitalage.com/2012/01/25/python-ftp-and-get-recent-file/</link>
		<comments>http://krisindigitalage.com/2012/01/25/python-ftp-and-get-recent-file/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 01:58:51 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
		
		<guid isPermaLink="false">http://krisindigitalage.com/?p=7730</guid>
		<description><![CDATA[the following is a script which downloads the latest image from  one of the NASA ftp server at eol.jsc.nasa.gov and to my amazement there are new images every 5 mins!, so I sent python to grab that image&#8230;. python supports ftp by importing the ftplib module and ftplib.FTP class. connecting to an ftp server is very [...]]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2012/01/25/python-ftp-and-get-recent-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active vs Passive Ftp</title>
		<link>http://krisindigitalage.com/2012/01/22/active-vs-passive-ftp/</link>
		<comments>http://krisindigitalage.com/2012/01/22/active-vs-passive-ftp/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 02:51:34 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
		
		<guid isPermaLink="false">http://krisindigitalage.com/?p=7725</guid>
		<description><![CDATA[a simple diagram which shows the difference between active and passive ftp ACTIVE FTP &#160; PASSIVE FTP &#160; &#160;]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2012/01/22/active-vs-passive-ftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>generating a QRcode in Vcard format in python</title>
		<link>http://krisindigitalage.com/2012/01/19/generating-a-qrcode-in-vcard-format-in-python/</link>
		<comments>http://krisindigitalage.com/2012/01/19/generating-a-qrcode-in-vcard-format-in-python/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 01:21:46 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://krisindigitalage.com/?p=7717</guid>
		<description><![CDATA[You can create a QRcode using the python pygooglechart wrapper for Google chart API. Here i used the wrapper to generate the QRcode as a django app but right now I wont go into the specifics of how to create a django app, maybe will do later, but this is the view i made for [...]]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2012/01/19/generating-a-qrcode-in-vcard-format-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>simplest python class tutorial</title>
		<link>http://krisindigitalage.com/2011/12/29/simplest-python-class-tutorial/</link>
		<comments>http://krisindigitalage.com/2011/12/29/simplest-python-class-tutorial/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 18:11:38 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://krisindigitalage.com/?p=7703</guid>
		<description><![CDATA[A class in python is a blueprint of the instances which you can create from, for example i want to create a house and i have the description and the properties of that house, now I can spawn multiple houses using that blueprint and every instance will be a separate entity from the other but [...]]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2011/12/29/simplest-python-class-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kyokushin Punches \ Tuski</title>
		<link>http://krisindigitalage.com/2011/12/28/kyokushin-punches-tuski/</link>
		<comments>http://krisindigitalage.com/2011/12/28/kyokushin-punches-tuski/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 02:05:15 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
				<category><![CDATA[kyokushin]]></category>

		<guid isPermaLink="false">http://krisindigitalage.com/?p=7661</guid>
		<description><![CDATA[&#160; &#160; &#160;]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2011/12/28/kyokushin-punches-tuski/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python amazon ec2 retrieve instance values</title>
		<link>http://krisindigitalage.com/2011/12/13/python-amazon-ec2-retrieve-instance-values/</link>
		<comments>http://krisindigitalage.com/2011/12/13/python-amazon-ec2-retrieve-instance-values/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 16:44:50 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
		
		<guid isPermaLink="false">http://krisindigitalage.com/?p=7628</guid>
		<description><![CDATA[Using python boto module its fairly easy to list all the attributes of an instance in the amazon EC2 cloud

you need to install the python boto package first, if you are using debian run this

[cc lang="text"]
root@localhost#apt-get install python-boto

or for centos

root@localhost#yum install python-boto
[/cc]


we start out script with first importing the boto module

[cc lang="text"]
from boto import ec2
import boto.ec2
[/cc]

<!--more-->

to connect to the instances you need the amazon access key id and the aws secret access key which you can get from the amazon's security settings under the amazon aws account.


to make our code simple and i created a function just to store the account information, as an example we will retrieve only the running instances

[cc lang="text"]
def login():
  account = "account name"
  aws_access_key = 'paste the access key here'
  aws_secret_key = 'paste the secret key here'
  running(aws_access_key,aws_secret_key,account)
[/cc]

the function account() will return all the instances for the above account

[cc lang="text"]
def account(a,s):
   access_key = a
   secret_key = s
   regions = boto.ec2.regions(aws_access_key_id=access_key,aws_secret_access_key=secret_key,is_secure=False)
   eu = regions[0]
   conn_eu = eu.connect(aws_access_key_id=access_key,aws_secret_access_key=secret_key)
   inst = conn_eu.get_all_instances()
   return inst
[/cc]
and we pass these onto the running function..which will list the mentioned attributes

[cc lang="text"]
def running(a,s,h):
   host = h
   f = open("/tmp/test.txt", "a")
   sto = sys.stdout
   sys.stdout = f
   print "-----------------------------------------------------------------------------------------------------------------------------------------------------"
   print "RUNNING INSTANCES ON ", host
   print "ID\t\tAMI-ID\t\tArch.\tType\t\tState\tLaunch Time\t\t\tPublic DNS\t\t\t\t\t\tPrivate IP\t\tName"
   access = a
   secret = s
   instt = account(access,secret)
   for i in instt:
      for r in i.instances:
          if 'running' in r.state:
              print "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (r.id,r.image_id,r.architecture,r.instance_type,r.state,r.launch_time,r.public_dns_name,r.private_ip_address,r.tags['Name'])
              
   f.close()
   sys.stdout = sto
[/cc]

hope this helps...
  


]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2011/12/13/python-amazon-ec2-retrieve-instance-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>veritas VxVM create a mirrored volume from two concatenated plexes</title>
		<link>http://krisindigitalage.com/2011/11/12/veritas-vxvm-create-a-mirrored-volume-from-two-concatenated-plexes/</link>
		<comments>http://krisindigitalage.com/2011/11/12/veritas-vxvm-create-a-mirrored-volume-from-two-concatenated-plexes/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 11:08:32 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
		
		<guid isPermaLink="false">http://krisindigitalage.com/2011/11/12/veritas-vxvm-create-a-mirrored-volume-from-two-concatenated-plexes/</guid>
		<description><![CDATA[&#160; This is a typical example on how to to create a veritas volume with concatenated plexes. The disk has two disk controllers c1&#038;c2 with two disks eack. We will create veritas disk out of them and assign them a unique name eg. disk1,disk2,disk3 and disk4. Before we install veritas storage foundation we should know [...]]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2011/11/12/veritas-vxvm-create-a-mirrored-volume-from-two-concatenated-plexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Install and Configure Puppet with Modules</title>
		<link>http://krisindigitalage.com/2011/10/31/quick-install-and-configure-puppet-with-modules/</link>
		<comments>http://krisindigitalage.com/2011/10/31/quick-install-and-configure-puppet-with-modules/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 12:27:41 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[puppet]]></category>

		<guid isPermaLink="false">http://krisindigitalage.com/?p=7595</guid>
		<description><![CDATA[Puppet install is pretty straightforward this article is based on these versions puppet-2.6.6-3.fc15.noarch puppet-server-2.6.6-3.fc15.noarch on the master server install puppet-server 1yum install puppet-server and on the clients 1yum install puppet First we set up the certificate keys so that the clients can talk to the puppet master server securely. ON the clients configure puppet 1234567891011121314vim [...]]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2011/10/31/quick-install-and-configure-puppet-with-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>create an snmp nagios plugin using python</title>
		<link>http://krisindigitalage.com/2011/10/12/how-to-create-an-snmp-nagios-plugin-using-python/</link>
		<comments>http://krisindigitalage.com/2011/10/12/how-to-create-an-snmp-nagios-plugin-using-python/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 00:17:20 +0000</pubDate>
		<dc:creator>kshk</dc:creator>
				<category><![CDATA[nagios]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://krisindigitalage.com/?p=7588</guid>
		<description><![CDATA[To create a nagios plugin we need to keep in the mind the exit codes of the program/plugin which is interpreted by nagios to determine the status of the service. 12345Return Code &#160; &#160; &#160; &#160; &#160;Status 0 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; OK. The service is functioning [...]]]></description>
		<wfw:commentRss>http://krisindigitalage.com/2011/10/12/how-to-create-an-snmp-nagios-plugin-using-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using xcache
Object Caching 1976/2139 objects using xcache

Served from: krisindigitalage.com @ 2012-02-23 07:49:35 -->
