<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3928190665450830956</atom:id><lastBuildDate>Mon, 21 May 2012 10:24:44 +0000</lastBuildDate><category>VBScript</category><category>install</category><category>Windows XP</category><category>WM_COMMAND</category><category>Top Individual Scores</category><category>Software Engineering</category><category>database system</category><category>how to</category><category>unrar</category><category>my notes</category><category>open source</category><category>gsm modem</category><category>audio</category><category>css</category><category>pentium processor</category><category>My List</category><category>Profound Vibra</category><category>xss</category><category>pagerank</category><category>ts-7260</category><category>ActivePerl</category><category>Perl Express</category><category>scripting</category><category>ActiveState</category><category>Computer Science</category><category>MySQL</category><category>SSH</category><category>internet connection</category><category>tips and tricks</category><category>it's all about the pentiums</category><category>Wii</category><category>more</category><category>Perl</category><category>Cheat Code</category><category>ts-7000</category><category>Visual basic</category><category>bash</category><category>networking</category><category>wordpress</category><category>About me</category><category>flip form</category><category>squid</category><category>java web application</category><category>baby</category><category>database design</category><category>Socket</category><category>HTML</category><category>blogspot hack</category><category>embedded system</category><category>mp3</category><category>LISP</category><category>VBScript Beginners Division</category><category>pentium</category><category>HitungHari</category><category>javascript</category><category>Technology</category><category>gadget</category><category>Programming</category><category>Videos</category><category>C Programming</category><category>PowerShell</category><category>python</category><category>electronic</category><category>computer</category><category>debian</category><category>Perl IDE</category><category>web programming</category><category>mobile phone</category><category>TS-ARM</category><category>Android</category><category>Python Server Page</category><category>Operating System</category><category>rar</category><category>database</category><category>php programming</category><category>linux</category><category>Microsoft TechNet</category><category>C++ Programming</category><category>coder's talk</category><category>translation</category><category>php</category><category>web master</category><category>fakap</category><category>Scripting Games</category><category>tutorial</category><category>weird al yankovic</category><category>VB6</category><category>Hackers</category><category>The Officials</category><category>VB</category><category>blog</category><category>SendMessage</category><category>XP Style</category><category>gprs</category><category>API</category><category>OSDC.my</category><category>Vibration Measurement</category><category>web interface</category><category>wireless</category><category>Linux shell script</category><category>world's smallest website</category><category>anime</category><category>Ubuntu</category><category>StretchBlt</category><title>Coder's Talk</title><description>A Programmer's Blog</description><link>http://coderstalk.blogspot.com/</link><managingEditor>noreply@blogger.com (ApOgEE)</managingEditor><generator>Blogger</generator><openSearch:totalResults>99</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CodersTalk" /><feedburner:info uri="coderstalk" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><url>http://www.feedburner.com/fb/images/pub/fb_pwrd.gif</url></image><feedburner:emailServiceId>CodersTalk</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-3005353762339160225</guid><pubDate>Fri, 05 Aug 2011 23:38:00 +0000</pubDate><atom:updated>2011-08-06T07:38:44.539+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">squid</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><title>Caching Youtube Using Squid Caching Proxy</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" width="520" src="http://2.bp.blogspot.com/-LELf9D-_e-I/Tjx4Z7F81yI/AAAAAAAACZ0/eS8ZBs0SdIA/s800/squid-cache-youtube-coderstalk.blogspot.com-2011.png" /&gt;&lt;/div&gt;&lt;br/&gt;I'm doing quick post today as I'm quite busy right now. But I don't want to make my friend Piju disappointed as he request me (quite so long... sorry heheh) about my changes on his previous squid.conf to cache youtube which is not working anymore since youtube make some changes on their video URL.&lt;br/&gt;&lt;br/&gt;Here is my new /etc/squid/squid.conf&lt;br/&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 8pt; height: 800px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;br /&gt;acl&amp;nbsp;all&amp;nbsp;src&amp;nbsp;all&lt;br /&gt;acl&amp;nbsp;manager&amp;nbsp;proto&amp;nbsp;cache_object&lt;br /&gt;acl&amp;nbsp;localhost&amp;nbsp;src&amp;nbsp;127.0.0.1/32&lt;br /&gt;acl&amp;nbsp;to_localhost&amp;nbsp;dst&amp;nbsp;127.0.0.0/8&amp;nbsp;0.0.0.0/32&lt;br /&gt;acl&amp;nbsp;localnet&amp;nbsp;src&amp;nbsp;10.0.0.0/8&amp;nbsp;#&amp;nbsp;RFC1918&amp;nbsp;possible&amp;nbsp;internal&amp;nbsp;network&lt;br /&gt;acl&amp;nbsp;localnet&amp;nbsp;src&amp;nbsp;172.16.0.0/12&amp;nbsp;&amp;nbsp;#&amp;nbsp;RFC1918&amp;nbsp;possible&amp;nbsp;internal&amp;nbsp;network&lt;br /&gt;acl&amp;nbsp;localnet&amp;nbsp;src&amp;nbsp;192.168.0.0/16&amp;nbsp;#&amp;nbsp;RFC1918&amp;nbsp;possible&amp;nbsp;internal&amp;nbsp;network&lt;br /&gt;acl&amp;nbsp;SSL_ports&amp;nbsp;port&amp;nbsp;443&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;http&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;ftp&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;443&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;https&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;70&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;gopher&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;210&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;wais&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;1025-65535&amp;nbsp;&amp;nbsp;#&amp;nbsp;unregistered&amp;nbsp;ports&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;280&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;http-mgmt&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;488&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;gss-http&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;591&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;filemaker&lt;br /&gt;acl&amp;nbsp;Safe_ports&amp;nbsp;port&amp;nbsp;777&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;multiling&amp;nbsp;http&lt;br /&gt;acl&amp;nbsp;CONNECT&amp;nbsp;method&amp;nbsp;CONNECT&lt;br /&gt;http_access&amp;nbsp;allow&amp;nbsp;manager&amp;nbsp;localhost&lt;br /&gt;http_access&amp;nbsp;deny&amp;nbsp;manager&lt;br /&gt;http_access&amp;nbsp;deny&amp;nbsp;!Safe_ports&lt;br /&gt;http_access&amp;nbsp;deny&amp;nbsp;CONNECT&amp;nbsp;!SSL_ports&lt;br /&gt;http_access&amp;nbsp;allow&amp;nbsp;localnet&lt;br /&gt;http_access&amp;nbsp;deny&amp;nbsp;all&lt;br /&gt;icp_access&amp;nbsp;allow&amp;nbsp;localnet&lt;br /&gt;icp_access&amp;nbsp;deny&amp;nbsp;all&lt;br /&gt;http_port&amp;nbsp;31288&lt;br /&gt;hierarchy_stoplist&amp;nbsp;cgi-bin&amp;nbsp;?&lt;br /&gt;cache_mem&amp;nbsp;2048&amp;nbsp;MB&lt;br /&gt;maximum_object_size_in_memory&amp;nbsp;1024&amp;nbsp;KB&lt;br /&gt;cache_dir&amp;nbsp;ufs&amp;nbsp;/disk2-cache/var/cache&amp;nbsp;150000&amp;nbsp;16&amp;nbsp;256&lt;br /&gt;cache_dir&amp;nbsp;ufs&amp;nbsp;/disk1-1/squid-cache&amp;nbsp;150000&amp;nbsp;16&amp;nbsp;256&lt;br /&gt;maximum_object_size&amp;nbsp;128&amp;nbsp;MB&lt;br /&gt;access_log&amp;nbsp;/disk2-cache/var/logs/access.log&amp;nbsp;squid&lt;br /&gt;cache_log&amp;nbsp;/disk2-cache/var/logs/cache.log&lt;br /&gt;cache_store_log&amp;nbsp;/disk2-cache/var/logs/store.log&lt;br /&gt;pid_filename&amp;nbsp;/disk2-cache/var/logs/squid.pid&lt;br /&gt;netdb_filename&amp;nbsp;/disk2-cache/var/logs/netdb.state&lt;br /&gt;storeurl_rewrite_children&amp;nbsp;50&lt;br /&gt;refresh_pattern&amp;nbsp;-i&amp;nbsp;\.flv$&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1440&amp;nbsp;&amp;nbsp;&amp;nbsp;80%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10080&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;^ftp:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1440&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;20%&amp;nbsp;10080&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;^http://[A-Za-z0-9]+\.lscache[0-9]\.c\.youtube\.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;90%&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;^http://[a-z0-9]+\.youtube\.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;90%&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;^http://[a-z]+\.youtube\.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;90%&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;^http://[a-z0-9]+\.ytimg\.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;90%&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;^http://*\.youtube\.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;&amp;nbsp;90%&amp;nbsp;&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;get_video\?video_id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;&amp;nbsp;90%&amp;nbsp;&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;youtube\.com/get_video\?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;&amp;nbsp;90%&amp;nbsp;&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;^http://*.youtube.com/.*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9999999&amp;nbsp;&amp;nbsp;100%&amp;nbsp;999999999&amp;nbsp;ignore-no-cache&amp;nbsp;override-expire&amp;nbsp;ignore-private&lt;br /&gt;refresh_pattern&amp;nbsp;(get_video\?|videoplayback\?|videodownload\?)&amp;nbsp;10080&amp;nbsp;99.99999%&amp;nbsp;999999&amp;nbsp;override-expire&amp;nbsp;ignore-reload&amp;nbsp;ignore-private&amp;nbsp;negative-ttl=0&lt;br /&gt;refresh_pattern&amp;nbsp;^gopher:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1440&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0%&amp;nbsp;&amp;nbsp;1440&lt;br /&gt;refresh_pattern&amp;nbsp;-i&amp;nbsp;(/cgi-bin/|\?)&amp;nbsp;0&amp;nbsp;0%&amp;nbsp;&amp;nbsp;0&lt;br /&gt;refresh_pattern&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;40%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4320&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;\.youtube\.com\/get_video\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;\.youtube\.com\/videoplayback\.youtube\.com\/videoplay&amp;nbsp;\.youtube\.com\/get_video\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;\.youtube\.[a-z][a-z]\/videoplayback\.youtube\.[a-z][a-z]\/videoplay&amp;nbsp;\.youtube\.[a-z][a-z]\/get_video\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;\.googlevideo\.com\/videoplayback\.googlevideo\.com\/videoplay&amp;nbsp;\.googlevideo\.com\/get_video\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;\.google\.com\/videoplayback\.google\.com\/videoplay&amp;nbsp;\.google\.com\/get_video\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;\.google\.[a-z][a-z]\/videoplayback\.google\.[a-z][a-z]\/videoplay&amp;nbsp;\.google\.[a-z][a-z]\/get_video\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplayback\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplay\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/get_video\?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;http://video\..*fbcdn\.net.*\.mp4.*&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;http://.[0-9]\.[0-9][0-9]\.channel\.facebook\.com/.*&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;http://.*\.mp4?&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;http://www\.facebook\.com/ajax/flash/.*&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;http://.*\.ak\.fbcdn\.net/.*&lt;br /&gt;acl&amp;nbsp;store_rewrite_list&amp;nbsp;url_regex&amp;nbsp;-i&amp;nbsp;\.geo.yahoo\.com\?&lt;br /&gt;storeurl_access&amp;nbsp;allow&amp;nbsp;store_rewrite_list&lt;br /&gt;storeurl_access&amp;nbsp;deny&amp;nbsp;all&lt;br /&gt;storeurl_rewrite_program&amp;nbsp;/etc/squid/youtube&lt;br /&gt;quick_abort_min&amp;nbsp;500&amp;nbsp;KB&lt;br /&gt;acl&amp;nbsp;shoutcast&amp;nbsp;rep_header&amp;nbsp;X-HTTP09-First-Line&amp;nbsp;^ICY.[0-9]&lt;br /&gt;upgrade_http0.9&amp;nbsp;deny&amp;nbsp;shoutcast&lt;br /&gt;acl&amp;nbsp;apache&amp;nbsp;rep_header&amp;nbsp;Server&amp;nbsp;^Apache&lt;br /&gt;broken_vary_encoding&amp;nbsp;allow&amp;nbsp;apache&lt;br /&gt;cache_mgr&amp;nbsp;apogee@apogeek.com&lt;br /&gt;cache_effective_user&amp;nbsp;squid&lt;br /&gt;cache_effective_group&amp;nbsp;squid&lt;br /&gt;snmp_port&amp;nbsp;3401&lt;br /&gt;acl&amp;nbsp;aclname&amp;nbsp;snmp_community&amp;nbsp;string&lt;br /&gt;acl&amp;nbsp;snmppublic&amp;nbsp;snmp_community&amp;nbsp;public&lt;br /&gt;snmp_access&amp;nbsp;allow&amp;nbsp;snmppublic&amp;nbsp;all&lt;br /&gt;snmp_outgoing_address&amp;nbsp;0.0.0.0&lt;br /&gt;dns_nameservers&amp;nbsp;8.8.8.8&lt;br /&gt;dns_nameservers&amp;nbsp;8.8.4.4&lt;br /&gt;dns_nameservers&amp;nbsp;4.2.2.2&lt;br /&gt;coredump_dir&amp;nbsp;/disk2-cache/var/cache&lt;br /&gt;&lt;/pre&gt;&lt;br/&gt;And here is the /etc/squid/youtube Perl script&lt;br/&gt;&lt;pre style="background-color: #e5ff80; border: 1px inset; font-family: Monospace,monospace; font-size: 8pt; height: 500px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;$|=1;&lt;br /&gt;while&amp;nbsp;(&amp;lt;&amp;gt;)&amp;nbsp;{&lt;br /&gt;@X&amp;nbsp;=&amp;nbsp;split;&lt;br /&gt;$url&amp;nbsp;=&amp;nbsp;$X[0];&lt;br /&gt;if&amp;nbsp;($url=~s@^http://(.*?)/videoplayback\?(.*)id=(.*?)&amp;amp;.*@squid://videos.youtube.INTERNAL/ID=$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)/videoplayback\?(.*)id=(.*?)@squid://videos.youtube.INTERNAL/ID=$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)/videoplay\?(.*)id=(.*?)&amp;amp;.*@squid://videos.youtube.INTERNAL/ID=$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)/videoplay\?(.*)id=(.*?)@squid://videos.youtube.INTERNAL/ID=$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)&amp;amp;.*@squid://videos.youtube.INTERNAL/ID=$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)@squid://videos.youtube.INTERNAL/ID=$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)rapidshare(.*?)/files/(.*?)/(.*?)/(.*?)@squid://files.rapidshare.INTERNAL/$5@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)fbcdn\.net/(.*?)/(.*?)/(.*?\.jpg)@squid://files.facebook.INTERNAL/$4@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://contenidos2(.*?)/(.*?)@squid://files.contenidos2.INTERNAL/$2@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://cdn(.*?)/([0-9a-zA-Z_-]*?\.flv)@squid://files.cdn.INTERNAL/$2@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://web.vxv.com/data/media/(.*?)@squid://files.vxv.INTERNAL/$1@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)megaupload\.com/files/(.*?)/(.*?)@squid://files.megaupload.INTERNAL/$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)mediafire\.com/(.*?)/(.*?)@squid://files.megaupload.INTERNAL/$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)depositfiles\.com/(.*?)/(.*?)/(.*?)@squid://files.megaupload.INTERNAL/$4@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)\.files\.youporn\.com\/(.*?)\/([0-9a-zA-Z_-]*?\.flv)\?.*@squid://videos.youporn.INTERNAL/$3@){}&lt;br /&gt;elsif&lt;br /&gt;($url=~s@^http://(.*?)\.tube8\.com\/(.*?)\/([0-9a-zA-Z_-]*?\.flv)\?.*@squid://videos.tube8.INTERNAL/$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)\.tube8\.com\/(.*?)\/([0-9a-zA-Z_-]*?\.flv)@squid://videos.tube8.INTERNAL/$3@){}&lt;br /&gt;elsif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;($url=~s@^http://(.*?)megaporn\.com\/files\/(.*?)\/(.*?)@squid://files.megaporn.INTERNAL/$3@){}&lt;br /&gt;&lt;br /&gt;print&amp;nbsp;"$url\n";&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br/&gt;Since this happen for quite some time and I'm busy coding something else, I don't remember which part were changed. Maybe somewhere around url_regex. Perhaps if &lt;a href="http://piju.fakap.net/2008/11/08/tutorial-how-to-cache-youtube-using-squid-caching-proxy/"&gt;piju's blog&lt;/a&gt; are still running (which is currently not), we can do a diff to compare them. Anyway, here it is. These scripts are shared and distributed as is. If you change it, feel free to let me know. Otherwise, just enjoy! &lt;img class="inline" src="http://coderstalk.googlepages.com/sengih.gif" /&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-3005353762339160225?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/Gi90PX9f9x8/caching-youtube-using-squid-caching.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-LELf9D-_e-I/Tjx4Z7F81yI/AAAAAAAACZ0/eS8ZBs0SdIA/s72-c/squid-cache-youtube-coderstalk.blogspot.com-2011.png" height="72" width="72" /><thr:total>16</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2011/08/caching-youtube-using-squid-caching.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7833074654993896059</guid><pubDate>Sun, 24 Apr 2011 23:29:00 +0000</pubDate><atom:updated>2011-04-25T19:01:29.187+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python Server Page</category><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><title>Python Server Pages Example of GET POST Form Input</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://coderstalk.blogspot.com" imageanchor="1"&gt;&lt;img border="0" width="520" src="http://4.bp.blogspot.com/-a9SptPidBJM/TbNctmSQG_I/AAAAAAAACTo/PllTMSllxUI/s600/python-form.png" /&gt;&lt;/a&gt;&lt;/div&gt;Previously, I've talked about mod_python.publisher method of creating a &lt;a href="http://coderstalk.blogspot.com/2009/11/example-of-simple-website-using-python.html"&gt;simple website using Python&lt;/a&gt;. And this time, I will talk about mod_python.psp where &lt;b&gt;PSP&lt;/b&gt; stands for &lt;b&gt;Python Server Pages&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;What good about Python Server Pages for former PHP or JSP programmer is the way you can write your code where you can use the &amp;lt;% # your code here %&amp;gt; tag as you always do. But before that, you have to configure your server to enable mod_python.psp.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pre-requisite&lt;/b&gt;&lt;br /&gt;In order to run your site with PSP, you have to install and enable mod_python. Here is the steps if you are using Ubuntu:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install apache2 and libapache2-mod-python and enable mod-python&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ sudo apt-get install apache2&lt;br /&gt;$ sudo apt-get install libapache2-mod-python&lt;br /&gt;$ sudo a2enmod python&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Edit /etc/apache2/sites-enabled/000-default. Search for this lines:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 130px; text-align: left;"&gt;&amp;lt;Directory /var/www/&amp;gt;&lt;br /&gt;                Options Indexes FollowSymLinks MultiViews&lt;br /&gt;                AllowOverride None&lt;br /&gt;                Order allow,deny&lt;br /&gt;                allow from all&lt;br /&gt;        &amp;lt;/Directory&amp;gt;&lt;br /&gt;&lt;/pre&gt;and add python handler like this:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 220px; text-align: left;"&gt;&amp;lt;Directory /var/www/&amp;gt;&lt;br /&gt;                Options Indexes FollowSymLinks MultiViews&lt;br /&gt;                AllowOverride None&lt;br /&gt;                Order allow,deny&lt;br /&gt;                allow from all&lt;br /&gt;                &lt;font color="red"&gt;&lt;br /&gt;                AddHandler mod_python .psp&lt;br /&gt;                PythonHandler mod_python.psp&lt;br /&gt;                PythonDebug On&lt;br /&gt;                &lt;/font&gt;&lt;br /&gt;        &amp;lt;/Directory&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Restart your apache&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ sudo /etc/init.d/apache2 restart&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;You can also enable index.php for your DirectoryIndex by editing /etc/apache2/mods-enabled/dir.conf and add this string (in red):&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 70px; text-align: left;"&gt;&amp;lt;IfModule mod_dir.c&amp;gt;&lt;br /&gt;          DirectoryIndex &lt;font color="#FF0000"&gt;index.psp&lt;/font&gt; index.html index.cgi index.pl index.php index.xhtml index.htm &lt;br /&gt;&amp;lt;/IfModule&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;b&gt;Sample Python Server Pages Website&lt;/b&gt;&lt;br /&gt;And here is my sample code:&lt;br /&gt;&lt;style&gt; .style_1{color: #008000;} .style_2{color: #400080;} .style_3{color: #935300;} .style_4{color: #935300;} .style_5{color: #600080;font-weight: bold;} .style_10{color: #300080;} .style_11{color: #000000;} .style_13{color: #000000;}&lt;/style&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 8pt; height: 800px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span class="style_10"&gt;&amp;lt;%&lt;/span&gt;&lt;br /&gt;&lt;span class="style_5"&gt;import&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;cgi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="style_11"&gt;thetitle&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;"Coder's&amp;nbsp;Talk&amp;nbsp;Python&amp;nbsp;Form&amp;nbsp;Example"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="style_1"&gt;#&amp;nbsp;it&amp;nbsp;doesn't&amp;nbsp;matter&amp;nbsp;whether&amp;nbsp;it&amp;nbsp;is&amp;nbsp;post&amp;nbsp;or&amp;nbsp;get&amp;nbsp;method&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;#&amp;nbsp;getfirst&amp;nbsp;will&amp;nbsp;find&amp;nbsp;the&amp;nbsp;item.&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;username&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;form&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;getfirst&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_4"&gt;'username'&lt;/span&gt;&lt;span class="style_10"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;themail&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;form&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;getfirst&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_4"&gt;'usermail'&lt;/span&gt;&lt;span class="style_10"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="style_10"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;html&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;head&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;title&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&amp;lt;%=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;thetitle&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;title&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;head&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;style&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;body&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;{&lt;/span&gt;&lt;span class="style_11"&gt;font&lt;/span&gt;&lt;span class="style_10"&gt;-&lt;/span&gt;&lt;span class="style_11"&gt;family&lt;/span&gt;&lt;span class="style_10"&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;Arial&lt;/span&gt;&lt;span class="style_10"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;font&lt;/span&gt;&lt;span class="style_10"&gt;-&lt;/span&gt;&lt;span class="style_11"&gt;size&lt;/span&gt;&lt;span class="style_10"&gt;:&lt;/span&gt;&lt;span class="style_2"&gt;13px&lt;/span&gt;&lt;span class="style_10"&gt;;}&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;#contentbox&amp;nbsp;{width:&amp;nbsp;640px;&amp;nbsp;margin:0&amp;nbsp;auto;}&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;copy&lt;/span&gt;&lt;span class="style_10"&gt;,&amp;nbsp;.&lt;/span&gt;&lt;span class="style_11"&gt;copy&amp;nbsp;a&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;{&lt;/span&gt;&lt;span class="style_11"&gt;width&lt;/span&gt;&lt;span class="style_10"&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class="style_2"&gt;640px&lt;/span&gt;&lt;span class="style_10"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;margin&lt;/span&gt;&lt;span class="style_10"&gt;:&lt;/span&gt;&lt;span class="style_2"&gt;0&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;auto&lt;/span&gt;&lt;span class="style_10"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;color&lt;/span&gt;&lt;span class="style_10"&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;#DD8888;}&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;formresult&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;{&lt;/span&gt;&lt;span class="style_11"&gt;background&lt;/span&gt;&lt;span class="style_10"&gt;-&lt;/span&gt;&lt;span class="style_11"&gt;color&lt;/span&gt;&lt;span class="style_10"&gt;:&lt;/span&gt;&lt;span class="style_11"&gt;#FFFF99;display:block;width:100%;padding:10px;}&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;style&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;body&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;div&amp;nbsp;id&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"contentbox"&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;h1&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&amp;lt;%=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;thetitle&lt;/span&gt;&lt;span class="style_10"&gt;%&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;h1&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;%&lt;/span&gt;&lt;br /&gt;&lt;span class="style_5"&gt;if&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;username&lt;/span&gt;&lt;span class="style_10"&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_11"&gt;username&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;cgi&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;escape&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_11"&gt;username&lt;/span&gt;&lt;span class="style_10"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;p&amp;nbsp;&lt;/span&gt;&lt;span class="style_5"&gt;class&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"formresult"&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;span class="style_11"&gt;Hello&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;&amp;lt;%=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;username&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;%&amp;gt;!&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;br&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;%&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_5"&gt;if&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;themail&lt;/span&gt;&lt;span class="style_10"&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_11"&gt;themail&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;cgi&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;escape&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_11"&gt;themail&lt;/span&gt;&lt;span class="style_10"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;Your&amp;nbsp;email&amp;nbsp;&lt;/span&gt;&lt;span class="style_5"&gt;is&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;&amp;lt;%=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;themail&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;%&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;p&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;%&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_5"&gt;else&lt;/span&gt;&lt;span class="style_10"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;You&amp;nbsp;didn&lt;/span&gt;&lt;span class="style_11"&gt;'t&amp;nbsp;enter&amp;nbsp;your&amp;nbsp;email.&amp;nbsp;You&amp;nbsp;don'&lt;/span&gt;&lt;span class="style_11"&gt;t&amp;nbsp;have&amp;nbsp;email&lt;/span&gt;&lt;span class="style_10"&gt;?&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;p&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;%&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_1"&gt;#&amp;nbsp;end&amp;nbsp;if&amp;nbsp;themail&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;#&amp;nbsp;end&amp;nbsp;if&amp;nbsp;username&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;p&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;span class="style_11"&gt;This&amp;nbsp;&lt;/span&gt;&lt;span class="style_5"&gt;is&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;my&amp;nbsp;example&amp;nbsp;form&amp;nbsp;page&amp;nbsp;processing&amp;nbsp;using&amp;nbsp;POST&amp;nbsp;method&lt;/span&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;p&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;form&amp;nbsp;name&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"myform"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;method&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"post"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;action&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"index.psp"&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;Name&lt;/span&gt;&lt;span class="style_10"&gt;:&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;input&amp;nbsp;type&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"text"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;name&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"username"&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;br&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;Email&lt;/span&gt;&lt;span class="style_10"&gt;:&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;input&amp;nbsp;type&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"text"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;name&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"usermail"&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;br&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;input&amp;nbsp;type&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"submit"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;value&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"Submit"&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;form&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;br&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;p&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;span class="style_11"&gt;This&amp;nbsp;&lt;/span&gt;&lt;span class="style_5"&gt;is&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;the&amp;nbsp;same&amp;nbsp;thing&amp;nbsp;using&amp;nbsp;GET&amp;nbsp;method&lt;/span&gt;&lt;span class="style_10"&gt;.&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;p&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;form&amp;nbsp;name&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"myform"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;method&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"get"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;action&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"index.psp"&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;Name&lt;/span&gt;&lt;span class="style_10"&gt;:&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;input&amp;nbsp;type&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"text"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;name&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"username"&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;br&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_11"&gt;Email&lt;/span&gt;&lt;span class="style_10"&gt;:&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;input&amp;nbsp;type&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"text"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;name&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"usermail"&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;br&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;input&amp;nbsp;type&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"submit"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;value&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"Submit"&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;form&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;div&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;div&amp;nbsp;&lt;/span&gt;&lt;span class="style_5"&gt;class&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"copy"&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;iframe&amp;nbsp;src&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FCoders-Talk%2F138805102822113&amp;amp;amp;layout=standard&amp;amp;amp;show_faces=false&amp;amp;amp;width=640&amp;amp;amp;action=like&amp;amp;amp;font=tahoma&amp;amp;amp;colorscheme=light&amp;amp;amp;height=35"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;scrolling&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"no"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;frameborder&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"0"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;style&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"border:none;&amp;nbsp;overflow:hidden;&amp;nbsp;width:640px;&amp;nbsp;height:35px;"&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;allowTransparency&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"true"&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;iframe&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;br&lt;/span&gt;&lt;span class="style_10"&gt;/&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class="style_11"&gt;copy&lt;/span&gt;&lt;span class="style_10"&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;M&lt;/span&gt;&lt;span class="style_10"&gt;.&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;Fauzilkamil&amp;nbsp;Zainuddin&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;|&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span class="style_11"&gt;a&amp;nbsp;href&lt;/span&gt;&lt;span class="style_10"&gt;=&lt;/span&gt;&lt;span class="style_3"&gt;"http://coderstalk.blogspot.com"&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;span class="style_11"&gt;Coder&lt;/span&gt;&lt;span class="style_13"&gt;'s&amp;nbsp;Talk&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;body&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="style_11"&gt;html&lt;/span&gt;&lt;span class="style_10"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;&amp;lt;%&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;#&amp;nbsp;end&amp;nbsp;of&amp;nbsp;code.&amp;nbsp;Copyright&amp;nbsp;(C)&amp;nbsp;M.&amp;nbsp;Fauzilkamil&amp;nbsp;Zainuddin&amp;nbsp;(ApOgEE)&amp;nbsp;-&amp;nbsp;http://coderstalk.blogspot.com&lt;/span&gt;&lt;br /&gt;&lt;span class="style_10"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can also download the &lt;a href="http://coderstalk.googlecode.com/svn/trunk/sample-python-website/get-post-index.psp"&gt;source code here &lt;/a&gt;. Make sure you rename it as &lt;b&gt;index.psp&lt;/b&gt; or change the action name on the form tag to be the same as your psp file name. Feel free to try it, modified it and don't forget to 'Like' this blog on Facebook too &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;br /&gt;&lt;iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FCoders-Talk%2F138805102822113&amp;amp;layout=standard&amp;amp;show_faces=false&amp;amp;width=640&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:640px; height:35px;" allowTransparency="true"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7833074654993896059?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/n8I8L_IkpdM/python-server-pages-example-of-get-post.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-a9SptPidBJM/TbNctmSQG_I/AAAAAAAACTo/PllTMSllxUI/s72-c/python-form.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2011/04/python-server-pages-example-of-get-post.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-927248665811162374</guid><pubDate>Sat, 23 Apr 2011 19:25:00 +0000</pubDate><atom:updated>2011-04-24T08:08:41.454+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><title>Python Code to Get IP Address From Interface Name</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://coderstalk.blogspot.com/2011/04/python-code-to-get-ip-address-from.html" imageanchor="1" &gt;&lt;img border="0" width="520" src="http://1.bp.blogspot.com/-f6KsXaviXNM/TbMbLcPqVCI/AAAAAAAACTg/9hSyskwvle4/s600/coderstalk-python-code.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;From my previous code on &lt;a href="http://coderstalk.blogspot.com/2010/02/print-active-network-interface-list-in.html"&gt;How To Print Active Network Interface List in Linux using Python&lt;/a&gt;, I got this question.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Question from jimchris:&lt;/b&gt;&lt;br /&gt;Nice work, now how do we get ip address from ifacedata?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;My Answer:&lt;/b&gt;&lt;br /&gt;Here's how... Add this function to your &lt;a href="http://coderstalk.blogspot.com/2010/02/print-active-network-interface-list-in.html"&gt;python code&lt;/a&gt;:&lt;br /&gt;&lt;style&gt; .style_5 {color: #8000FF;font-weight: bold;} .style_9 {color: #0000FF;} .style_10 {color: #FF0022;} .style_11{color: #000000;}&lt;/style&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 90px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span class="style_5"&gt;def&amp;nbsp;&lt;/span&gt;&lt;span class="style_9"&gt;getifip&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_11"&gt;ifn&lt;/span&gt;&lt;span class="style_10"&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_5"&gt;import&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;socket&lt;/span&gt;&lt;span class="style_10"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;fcntl&lt;/span&gt;&lt;span class="style_10"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;struct&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_11"&gt;sck&amp;nbsp;&lt;/span&gt;&lt;span class="style_10"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;socket&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;socket&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_11"&gt;socket&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;AF_INET&lt;/span&gt;&lt;span class="style_10"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;socket&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;SOCK_DGRAM&lt;/span&gt;&lt;span class="style_10"&gt;)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="style_5"&gt;return&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;socket&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;inet_ntoa&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_11"&gt;fcntl&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;ioctl&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_11"&gt;sck&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;fileno&lt;/span&gt;&lt;span class="style_10"&gt;(),&lt;/span&gt;&lt;span class="style_2"&gt;0x8915&lt;/span&gt;&lt;span class="style_10"&gt;,&lt;/span&gt;&lt;span class="style_11"&gt;struct&lt;/span&gt;&lt;span class="style_10"&gt;.&lt;/span&gt;&lt;span class="style_11"&gt;pack&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_4"&gt;'256s'&lt;/span&gt;&lt;span class="style_10"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;ifn&lt;/span&gt;&lt;span class="style_10"&gt;[:&lt;/span&gt;&lt;span class="style_2"&gt;15&lt;/span&gt;&lt;span class="style_10"&gt;]))[&lt;/span&gt;&lt;span class="style_2"&gt;20&lt;/span&gt;&lt;span class="style_10"&gt;:&lt;/span&gt;&lt;span class="style_2"&gt;24&lt;/span&gt;&lt;span class="style_10"&gt;])&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then use it in your &lt;a href="http://coderstalk.blogspot.com/2010/02/print-active-network-interface-list-in.html"&gt;previous code&lt;/a&gt; like this:&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 20px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span class="style_5"&gt;print&amp;nbsp;&lt;/span&gt;&lt;span class="style_11"&gt;getifip&lt;/span&gt;&lt;span class="style_10"&gt;(&lt;/span&gt;&lt;span class="style_11"&gt;ifacedata&lt;/span&gt;&lt;span class="style_10"&gt;[&lt;/span&gt;&lt;span class="style_2"&gt;0&lt;/span&gt;&lt;span class="style_10"&gt;])&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;font color="#FF0000"&gt;&lt;b&gt;Update:&lt;/b&gt;&lt;/font&gt; you can also download the &lt;a href="http://coderstalk.googlecode.com/svn/trunk/python-sample/iflist.py"&gt;python source code here&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Wish you luck and Happy Coding! &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;br /&gt;&lt;iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FCoders-Talk%2F138805102822113&amp;amp;layout=standard&amp;amp;show_faces=false&amp;amp;width=640&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:640px; height:35px;" allowTransparency="true"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-927248665811162374?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/CmSc2yZi5JM/python-code-to-get-ip-address-from.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-f6KsXaviXNM/TbMbLcPqVCI/AAAAAAAACTg/9hSyskwvle4/s72-c/coderstalk-python-code.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2011/04/python-code-to-get-ip-address-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7556398536112283702</guid><pubDate>Fri, 22 Apr 2011 05:00:00 +0000</pubDate><atom:updated>2011-04-22T13:17:01.813+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">VBScript</category><title>VBScript Get File Extension</title><description>Before anything else, you may love to read this book too!...&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a imageanchor="1" target="_blank"  href="http://www.amazon.com/VBScript-Programmers-Reference-third-Text/dp/B004R212V8?ie=UTF8&amp;tag=coderstalkblo-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-zf_0qvkvLNE/TbEJQCUsXaI/AAAAAAAACTQ/4RaL1SQzYwc/s400/vbscript-third-edition.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Actually, I got this question from the reader of my previous blog post about &lt;a href="http://coderstalk.blogspot.com/2007/09/vbscript-to-replace-underscores-in.html"&gt;VBScript to Replace Underscores in Filename with Spaces for All Files in a Folder&lt;/a&gt;, and I decided to answer it here.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Question from Justin:&lt;/b&gt;&lt;br /&gt;I tried something simular..but modified your VBS..&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 440px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;'========================================================&lt;br /&gt;' VBScript to replace underscore in file name with space&lt;br /&gt;' for each files in a folder&lt;br /&gt;' Written by ApOgEE of http://coderstalk.blogspot.com&lt;br /&gt;'========================================================&lt;br /&gt;Dim sName&lt;br /&gt;Dim fso&lt;br /&gt;Dim fol&lt;br /&gt;&lt;br /&gt;' create the filesystem object&lt;br /&gt;Set fso = WScript.CreateObject("Scripting.FileSystemObject")&lt;br /&gt;&lt;br /&gt;' get current folder&lt;br /&gt;Set fol = fso.GetFolder(".")&lt;br /&gt;&lt;br /&gt;' go thru each files in the folder&lt;br /&gt;For Each fil In fol.Files&lt;br /&gt;' check if the file name contains underscore&lt;br /&gt;If InStr(1, fil.Name, "The ") &lt;&gt; 0 Then&lt;br /&gt;' replace underscore with space&lt;br /&gt;sName = Replace(fil.Name, "The ", "") &amp; ", The"&lt;br /&gt;' rename the file&lt;br /&gt;fil.Name = sName&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;' echo the job is completed&lt;br /&gt;WScript.Echo "Completed!"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;i have Files in a given folder that has Names in them...&lt;br /&gt;&lt;br /&gt;ie.&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 60px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;The Last Star Fighter&lt;br /&gt;Gone with the wind&lt;br /&gt;The Good, the Bad, and the Ugly.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With the modified VBS above Ive run it and i get the following...&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 60px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;Last Star Fighter.mp4, The&lt;br /&gt;Gone with the Wind&lt;br /&gt;Good, the Bad, and the Ugly.mp4, The&lt;br /&gt;&lt;/pre&gt;How do i get rid of the extention in the middle of the name? What am I doing wrong?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;My First answer:&lt;/b&gt;&lt;br /&gt;Dear Justin,&lt;br /&gt;check your code again. Search for line of code containing &lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 13px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;"sName = Replace"&lt;br /&gt;&lt;/pre&gt;and remove the code after ')'.&lt;br /&gt;&lt;br /&gt;Specifically, the code: &lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 13px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;'&amp; ", The"'&lt;br /&gt;&lt;/pre&gt;have to be removed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Justin Replies:&lt;/b&gt;&lt;br /&gt;Ok i Changed the Line in question...and Reran the code...&lt;br /&gt;&lt;br /&gt;Now i get...&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 60px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;Gone with the Wind --ok&lt;br /&gt;Good, the Bad, and the Ugly --Problem&lt;br /&gt;&lt;br /&gt;Last Star Fighter --Problem&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;They Should read...&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 60px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;Gone with the Wind&lt;br /&gt;Good, the Bad, and the Ugly, The&lt;br /&gt;Last Star Fighter, The&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;My Answer:&lt;/b&gt;&lt;br /&gt;If that is the case, you should get and strip the file extension before you replace the name and add it back to the filename after replacement. Here is the snippet:&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 100px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;font color="#008800"&gt;' get the file extension&lt;/font&gt;&lt;br /&gt;sExtension = fso.GetExtensionName(fil.Name)&lt;br /&gt;&lt;font color="#008800"&gt;' strip the extension from file name&lt;/font&gt;&lt;br /&gt;sName = Replace(fil.Name, "." &amp; sExtension, "")&lt;br /&gt;&lt;font color="#008800"&gt;' replace the whatever and put the extension back&lt;/font&gt;&lt;br /&gt;sName = Replace(sName, "The ", "") &amp; ", The" &amp; "." &amp; sExtension&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and your new code should look like this:&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 540px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;font color="#008800"&gt;'========================================================&lt;br /&gt;' VBScript to replace underscore in file name with space&lt;br /&gt;' for each files in a folder&lt;br /&gt;' Written by ApOgEE of http://coderstalk.blogspot.com&lt;br /&gt;'========================================================&lt;/font&gt;&lt;br /&gt;Dim sName&lt;br /&gt;Dim fso&lt;br /&gt;Dim fol&lt;br /&gt;&lt;br /&gt;&lt;font color="#008800"&gt;' create the filesystem object&lt;/font&gt;&lt;br /&gt;Set fso = WScript.CreateObject("Scripting.FileSystemObject")&lt;br /&gt;&lt;br /&gt;&lt;font color="#008800"&gt;' get current folder&lt;/font&gt;&lt;br /&gt;Set fol = fso.GetFolder(".")&lt;br /&gt;&lt;br /&gt;&lt;font color="#008800"&gt;' go thru each files in the folder&lt;/font&gt;&lt;br /&gt;For Each fil In fol.Files&lt;br /&gt;&lt;font color="#008800"&gt;' check if the file name contains underscore&lt;/font&gt;&lt;br /&gt;If InStr(1, fil.Name, "The ") &lt;&gt; 0 Then&lt;br /&gt;&lt;font color="#008800"&gt;' &lt;strike&gt;replace underscore with space&lt;/strike&gt;&lt;br /&gt;' &lt;strike&gt;sName = Replace(fil.Name, "The ", "") &amp; ", The"&lt;/strike&gt;&lt;br /&gt;' get the file extension&lt;/font&gt;&lt;br /&gt;sExtension = fso.GetExtensionName(fil.Name)&lt;br /&gt;&lt;font color="#008800"&gt;' strip the extension from file name&lt;/font&gt;&lt;br /&gt;sName = Replace(fil.Name, "." &amp; sExtension, "")&lt;br /&gt;&lt;font color="#008800"&gt;' replace the whatever and put the extension back&lt;/font&gt;&lt;br /&gt;sName = Replace(sName, "The ", "") &amp; ", The" &amp; "." &amp; sExtension&lt;br /&gt;&lt;font color="#008800"&gt;' rename the file&lt;/font&gt;&lt;br /&gt;fil.Name = sName&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;&lt;font color="#008800"&gt;' echo the job is completed&lt;/font&gt;&lt;br /&gt;WScript.Echo "Completed!"&lt;br /&gt;&lt;/pre&gt;Good luck!&lt;br /&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7556398536112283702?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/WRoRWUsmZXY/vbscript-get-file-extension.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-zf_0qvkvLNE/TbEJQCUsXaI/AAAAAAAACTQ/4RaL1SQzYwc/s72-c/vbscript-third-edition.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2011/04/vbscript-get-file-extension.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-5432157279446514639</guid><pubDate>Thu, 21 Apr 2011 05:54:00 +0000</pubDate><atom:updated>2011-04-25T19:12:39.754+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">open source</category><category domain="http://www.blogger.com/atom/ns#">HitungHari</category><category domain="http://www.blogger.com/atom/ns#">OSDC.my</category><category domain="http://www.blogger.com/atom/ns#">php programming</category><title>HitungHari - PHP Countdown Banner Application</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://coderstalk.blogspot.com/" imageanchor="1" &gt;&lt;img border="0" width="520" src="http://2.bp.blogspot.com/-4iCz8eReMN4/Ta_B4kBm2nI/AAAAAAAACTI/IdwsHtGVn7U/s600/hitunghari-code.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The ideas developed since my previous &lt;a href="http://coderstalk.blogspot.com/2011/04/mosc-2011-countdown-banner.html"&gt;Countdown Banner for MOSC2011&lt;/a&gt;. I have made some modification on  the source code and then it spark me an idea to share the source code as open source too. Therefore, I clean up my messy code, make some documentation and comments so people can reuse the code. And I name it as &lt;a href="http://code.google.com/p/hitunghari/"&gt;HitungHari&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The word &lt;b&gt;HitungHari&lt;/b&gt; actually come from Malay words for counting days. Where 'Hitung' means 'Count', and 'Hari' means 'Days'. I have more ideas to develop from this piece. Perhaps, you may also have ideas too. I would be glad to hear your comments. Checkout the &lt;a href="http://code.google.com/p/hitunghari/"&gt;Google Code site for HitungHari&lt;/a&gt; and feel free to download, try, hack, and comment it.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FCoders-Talk%2F138805102822113&amp;amp;layout=standard&amp;amp;show_faces=false&amp;amp;width=640&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:640px; height:35px;" allowTransparency="true"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-5432157279446514639?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/Mb9Xvezi-tA/hitunghari-php-countdown-banner.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-4iCz8eReMN4/Ta_B4kBm2nI/AAAAAAAACTI/IdwsHtGVn7U/s72-c/hitunghari-code.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2011/04/hitunghari-php-countdown-banner.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-6567037680853122893</guid><pubDate>Tue, 19 Apr 2011 04:21:00 +0000</pubDate><atom:updated>2011-04-25T19:06:31.451+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">open source</category><category domain="http://www.blogger.com/atom/ns#">OSDC.my</category><title>MOSC 2011 Countdown Banner</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://coderstalk.blogspot.com/2011/04/mosc-2011-countdown-banner.html" imageanchor="1"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-PRcz1mT6i14/Ta0MuNXTL3I/AAAAAAAACSU/kuDdjSCW4lw/s600/mosc-countdown-inkscape-apogee.png" width="520" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I'm just having fun with PHP GD and Inkscape. So, to make my toy useful, I would like to dedicate this Countdown banner for the upcoming MOSC 2011 event. You are free to put it on your blog or website. Here is the code to put on your site:&lt;br /&gt;&lt;style type="text/css"&gt;.style_1{color: #000099;}  .style_3{color: #007f00;} .style_6{color: #ff901e;} .style_8{color: #800080;} .style_9{color: #808080;} &lt;/style&gt;&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 110px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span class="style_9"&gt;&amp;lt;!--&amp;nbsp;MOSC2011&amp;nbsp;Countdown&amp;nbsp;Banner&amp;nbsp;By&amp;nbsp;ApOgEE&amp;nbsp;-&amp;nbsp;code&amp;nbsp;start&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;div&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;style&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"width:100%;&amp;nbsp;text-align:center;"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;a&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;href&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"http://www.mosc.my"&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;target&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"_blank"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;img&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;src&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"http://www.apogeek.com/osdc/mosc-countdown-img.php"&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;target&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"_blank"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_9"&gt;&amp;lt;!--&amp;nbsp;MOSC2011&amp;nbsp;Countdown&amp;nbsp;Banner&amp;nbsp;By&amp;nbsp;ApOgEE&amp;nbsp;-&amp;nbsp;code&amp;nbsp;end&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And here is the result:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; width: 100%;"&gt;&lt;a href="http://www.mosc.my/" target="_blank"&gt;&lt;img src="http://www.apogeek.com/osdc/mosc-countdown-img.php" target="_blank" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I hope you enjoy it! Feel free to Follow this blog if you like it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt;&lt;br /&gt;I heard request on MOSC2011 mailing list where some of them want this banner in different sizes. So, I've modified my php code and add this sizes:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MOSC Countdown Banner 300x250 &lt;/b&gt;&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 110px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span class="style_9"&gt;&amp;lt;!--&amp;nbsp;MOSC2011&amp;nbsp;Countdown&amp;nbsp;Banner&amp;nbsp;By&amp;nbsp;ApOgEE&amp;nbsp;-&amp;nbsp;code&amp;nbsp;start&amp;nbsp;300x250&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;div&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;style&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"width:100%;&amp;nbsp;text-align:center;"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;a&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;href&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"http://www.mosc.my"&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;target&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"_blank"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;img&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;src&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"http://www.apogeek.com/osdc/mosc-countdown-img.php?size=1"&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;target&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"_blank"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_9"&gt;&amp;lt;!--&amp;nbsp;MOSC2011&amp;nbsp;Countdown&amp;nbsp;Banner&amp;nbsp;By&amp;nbsp;ApOgEE&amp;nbsp;-&amp;nbsp;code&amp;nbsp;end&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;MOSC Countdown Banner 728x90 &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: white; border: 1px inset; font-family: Monospace,monospace; font-size: 9pt; height: 110px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span class="style_9"&gt;&amp;lt;!--&amp;nbsp;MOSC2011&amp;nbsp;Countdown&amp;nbsp;Banner&amp;nbsp;By&amp;nbsp;ApOgEE&amp;nbsp;-&amp;nbsp;code&amp;nbsp;start&amp;nbsp;728x90&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;div&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;style&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"width:100%;&amp;nbsp;text-align:center;"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;a&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;href&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"http://www.mosc.my"&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;target&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"_blank"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;img&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;src&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"http://www.apogeek.com/osdc/mosc-countdown-img.php?size=2"&amp;nbsp;&lt;/span&gt;&lt;span class="style_3"&gt;target&lt;/span&gt;&lt;span class="style_8"&gt;=&lt;/span&gt;&lt;span class="style_6"&gt;"_blank"&lt;/span&gt;&lt;span class="style_1"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_1"&gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style_9"&gt;&amp;lt;!--&amp;nbsp;MOSC2011&amp;nbsp;Countdown&amp;nbsp;Banner&amp;nbsp;By&amp;nbsp;ApOgEE&amp;nbsp;-&amp;nbsp;code&amp;nbsp;end&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I follow 2 of Google Adsense size. There are more wich I haven't had time to do yet. Please tell me if you need other specific size.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: red;"&gt;&lt;b&gt;Latest Update:&lt;/b&gt;&lt;/div&gt;I have shared my source code for this Countdown Banner and I call it &lt;a href="http://coderstalk.blogspot.com/2011/04/hitunghari-php-countdown-banner.html"&gt;HitungHari&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FCoders-Talk%2F138805102822113&amp;amp;layout=standard&amp;amp;show_faces=false&amp;amp;width=640&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:640px; height:35px;" allowTransparency="true"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-6567037680853122893?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/CUSAp-ILxis/mosc-2011-countdown-banner.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-PRcz1mT6i14/Ta0MuNXTL3I/AAAAAAAACSU/kuDdjSCW4lw/s72-c/mosc-countdown-inkscape-apogee.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2011/04/mosc-2011-countdown-banner.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-1243098768564200275</guid><pubDate>Wed, 13 Apr 2011 06:56:00 +0000</pubDate><atom:updated>2011-04-13T14:56:08.540+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Technology</category><category domain="http://www.blogger.com/atom/ns#">gadget</category><category domain="http://www.blogger.com/atom/ns#">Computer Science</category><title>Safe Way To Learn Chemical Reaction Without Using Actual Chemicals</title><description>I played with hydrochloric acid during my school's chemistry lab session. Drop a little amount of it to my text book while my teacher is teaching something else, and see the pages being eaten by those acids. Just because I'm getting bored in class. That was one case of myself. How about you? Have you ever misuse your science lab chemicals? Today, I found other way for student to learn about chemical reaction without ever use the actual chemical.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://coderstalk.blogspot.com" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" width="520" src="http://3.bp.blogspot.com/-jVzgfwQCsT0/TaVAHZmal-I/AAAAAAAACR0/j_d7kq2lthA/s600/_D7H9870.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://coderstalk.blogspot.com" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" width="520" src="http://3.bp.blogspot.com/-9tZ6bckd9Fo/TaVANhzpY4I/AAAAAAAACR8/gl83m6ogsWA/s600/_D7H9607.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;At Museum of Science and Industry in Chicago, you can experiment and create a chemical reaction using their interactive exhibit in the Science Storms wing. This interactive exhibit is called Create a Chemical Reaction. Using specially-tagged pucks, visitors can grab atoms from the periodic table and combine them to cause chemical reactions.&lt;br /&gt;&lt;br /&gt;&lt;iframe title="YouTube video player" width="525" height="390" src="http://www.youtube.com/embed/aGsmFLCcDSw" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;The "Create a Chemical Reaction" interactive exhibit is powered by &lt;a href="http://www.pattenstudio.com/projects/sensetable/" target="_blank"&gt;Sensetable&lt;/a&gt; platform from Patten Studio. The Sensetable concept and initial prototypes were developed by the Tangible Media Group at the MIT Media Lab. James Patten, Hiroshi Ishii, Jim Hines and Gian Pangaro are the people who invent this amazing Sensetable, A Wireless Object Tracking Platform for Tangible User Interfaces. Iwish I could play with it. I can imagine how this great invention can change our computing interface in the near future.&lt;br /&gt;&lt;br /&gt;(Via &lt;a href="http://www.pattenstudio.com/projects/chem/" target="_blank"&gt;Patten Studio&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-1243098768564200275?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/OODwL7cs7CQ/safe-way-to-learn-chemical-reaction.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-jVzgfwQCsT0/TaVAHZmal-I/AAAAAAAACR0/j_d7kq2lthA/s72-c/_D7H9870.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2011/04/safe-way-to-learn-chemical-reaction.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-1285537433576503772</guid><pubDate>Mon, 06 Dec 2010 00:30:00 +0000</pubDate><atom:updated>2010-12-06T09:37:39.391+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">more</category><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">ts-7260</category><category domain="http://www.blogger.com/atom/ns#">TS-ARM</category><category domain="http://www.blogger.com/atom/ns#">ts-7000</category><category domain="http://www.blogger.com/atom/ns#">embedded system</category><title>How to Add Swap on ts-7260 Linux</title><description>&lt;div style="text-align: left;"&gt;&lt;a href="http://coderstalk.blogspot.com/" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_QmenDvyMjlk/TPw7np9JYKI/AAAAAAAACKc/sE77W--LC0w/s1600/coderstalk.blogspot.com.embedded.png" /&gt;&lt;/a&gt;&lt;/div&gt;For any reason, you may need extra memory on your ts-7260 SBC but the build in RAM is only 28MB. In my case, it get rebooted when I'm running few programs that continuously reading the input from the DIO. As this system is running linux, we can use swap memory instead of physical RAM. So, to solve this problem, we can create swap file on this ts-7260. Here is how to add swapfile on ts-7260 board running the default debian Sarge on ts11 kernel 2.4 SD card boot linux.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;Let's check the free memory...&lt;br /&gt;&lt;pre id="linuxterm"&gt;&lt;span class="fullpost"&gt;root@ts7000:root# free -m&lt;br /&gt;total       used       free     shared    buffers     cached&lt;br /&gt;Mem:            28         26          1          0          1         18&lt;br /&gt;-/+ buffers/cache:          6         21&lt;br /&gt;Swap:            0          0          0&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;From the above result, you can see the total memory is 28 and we have 0 on swap. Now, we have to create the swapfile using this command:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;root@ts7000:root# dd if=/dev/zero of=/swapfile bs=1024 count=98304&lt;br /&gt;98304+0 records in&lt;br /&gt;98304+0 records out&lt;br /&gt;100663296 bytes transferred in 75.990000 seconds (1324691 bytes/sec)&lt;br /&gt;root@ts7000:root# mkswap -L swapfile /swapfile&lt;br /&gt;Setting up swapspace version 1, size = 100659 kB&lt;br /&gt;LABEL=swapfile, UUID=6c0cf1ae-d174-48c6-99ac-cc9f2a35ba21&lt;br /&gt;root@ts7000:root# swapon /swapfile &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Check free memory again&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;root@ts7000:root# free -m&lt;br /&gt;total       used       free     shared    buffers     cached&lt;br /&gt;Mem:            28         26          1          0          1         18&lt;br /&gt;-/+ buffers/cache:          6         21&lt;br /&gt;Swap:           95          0         95&lt;br /&gt;root@ts7000:root# &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, you should see there is 95MB swap. And  to make it permanent, add this entry on /etc/fstab&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;/swapfile none swap sw 0 0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;as the command goes...&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;root@ts7000:root# cat /etc/fstab&lt;br /&gt;proc             /proc         proc    defaults                 0    0&lt;br /&gt;none            /dev/pts        devpts        gid=5,mode=620    0 0&lt;br /&gt;/dev/sdcard0/disc0/part3 / ext2 defaults,noatime,async 1 1 &lt;br /&gt;root@ts7000:root# vi /etc/fstab&lt;br /&gt;root@ts7000:root# cat /etc/fstab&lt;br /&gt;proc             /proc         proc    defaults                 0    0&lt;br /&gt;none            /dev/pts        devpts        gid=5,mode=620    0 0&lt;br /&gt;/dev/sdcard0/disc0/part3 / ext2 defaults,noatime,async 1 1 &lt;br /&gt;/swapfile none swap sw 0 0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I hope this can help you with your ts-7260 SBC. Have fun!! &lt;img class="inline" src="http://coderstalk.googlepages.com/sengih.gif" /&gt; Don't forget to follow me on &lt;a href="http://coderstalk.blogspot.com/"&gt;Coder's Talk&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-1285537433576503772?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/z4_f2mVIusw/how-to-add-swap-on-ts-7260-linux.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_QmenDvyMjlk/TPw7np9JYKI/AAAAAAAACKc/sE77W--LC0w/s72-c/coderstalk.blogspot.com.embedded.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/12/how-to-add-swap-on-ts-7260-linux.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7809594395583734930</guid><pubDate>Fri, 18 Jun 2010 05:18:00 +0000</pubDate><atom:updated>2010-06-18T13:21:16.966+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">web interface</category><category domain="http://www.blogger.com/atom/ns#">linux</category><title>Solving RadiusManager Web Interface</title><description>&lt;b&gt;Siamak asked me:&lt;/b&gt; After following the installation manual, the admin.php page still showing blank page instead of the login page. Why is that?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;My Answer:&lt;/b&gt; I'm not a wizard to magically answer your problem... let me check your server.&lt;br /&gt;&lt;br /&gt;After checking the server here is some information...&lt;br /&gt;&lt;br /&gt;The linux:&lt;br /&gt;&lt;pre id="linuxterm"&gt;[root@localhost html]# uname -a&lt;br /&gt;Linux localhost.localdomain 2.6.27.5-117.fc10.i686 #1 SMP Tue Nov 18 12:19:59 EST 2008 i686 i686 i386 GNU/Linux&lt;/pre&gt;&lt;br /&gt;I try to see what is happening in the /var/log/httpd/access_log... &lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;XX.XX.XX.XXX - - [18/Jun/2011:23:12:03 +0800] "GET /radiusmanager/admin.php HTTP/1.1" 500 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.19) Gecko/2010040118 Ubuntu/8.10 (intrepid) Firefox/3.0.19"&lt;/pre&gt;&lt;br /&gt;so, I can see it is getting 500 error... seems like the server is misconfigured or something.&lt;br /&gt;&lt;br /&gt;This RadiusManager is using ionCube to encode the page. Therefore, I think the httpd server haven't configured to use enough memory to parse the file.&lt;br /&gt;&lt;br /&gt;What I do to fix this is simply edit the &lt;code&gt;/etc/httpd/conf.d/php.conf&lt;/code&gt; and add this line at the bottom...&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; height: 15px; text-align: left; width: 98%;"&gt;php_value memory_limit 500M&lt;/pre&gt;&lt;br /&gt;save the file and restart the httpd server:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;[root@localhost html]# service httpd restart&lt;/pre&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_QmenDvyMjlk/TBsBJLeYu5I/AAAAAAAACF8/Z4kobUL69DE/s1600/radius-manager.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_QmenDvyMjlk/TBsBJLeYu5I/AAAAAAAACF8/Z4kobUL69DE/s400/radius-manager.png" width="375" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, I can see the RadiusManager page. That's all Siamak. Have fun using linux! &lt;img class="inline" src="http://coderstalk.googlepages.com/tongue.gif" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7809594395583734930?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/-X_mdwv_0YQ/solving-radiusmanager-web-interface.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_QmenDvyMjlk/TBsBJLeYu5I/AAAAAAAACF8/Z4kobUL69DE/s72-c/radius-manager.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/06/solving-radiusmanager-web-interface.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-6809534778392592950</guid><pubDate>Wed, 16 Jun 2010 05:06:00 +0000</pubDate><atom:updated>2010-06-16T13:26:15.893+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Programming</category><category domain="http://www.blogger.com/atom/ns#">linux</category><title>Beginning C Programming in Linux</title><description>Don't ask a lot to begin C programming in Linux. Just grab your tools and start small. This time, I just wanna show you how to start C programming in linux. You can use any Linux distro. However, if you are beginner, just follow me using Ubuntu Linux.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Install the required packages.&lt;/b&gt;&lt;br /&gt;First of all, you have to make sure that you have C compiler to compile your code. In linux, we use "gcc - GNU project C and C++ compiler".&lt;br /&gt;&lt;br /&gt;In Debian, Ubuntu and it's family distro, all the basic programming tools for C programming can be found in build-essential package. Use this command to install this package:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ sudo apt-get install build-essential &lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2. Write your first program&lt;/b&gt;&lt;br /&gt;Now, after installing the required package, we can start coding our first program. As usual, you may start with a "Hello World" program.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Create new project directory&lt;/b&gt;&lt;br /&gt;Under your home directory, you may start creating your project directory to begin with. In this example, I'm calling it as myhello:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ mkdir myhello&lt;/pre&gt;&lt;br /&gt;Then, get into our project directory:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ cd myhello&lt;/pre&gt;&lt;br /&gt;Now, create our hello.c file. You may follow this example "hello world" code or be imaginative to modified it as you like. Experiments to see what is possible to modify in this code:&lt;br /&gt;&lt;pre style="border: 1px inset; height: 100px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span class="codestyle_9"&gt;#include&amp;nbsp;&lt;/span&gt;&lt;span class="codestyle_6"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle_5"&gt;int&amp;nbsp;&lt;/span&gt;&lt;span class="codestyle_11"&gt;main&lt;/span&gt;&lt;span class="codestyle_10"&gt;()&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="codestyle_11"&gt;printf&lt;/span&gt;&lt;span class="codestyle_10"&gt;(&lt;/span&gt;&lt;span class="codestyle_6"&gt;"Hello&amp;nbsp;My&amp;nbsp;friend,&amp;nbsp;Let's&amp;nbsp;do&amp;nbsp;C&amp;nbsp;programming\n"&lt;/span&gt;&lt;span class="codestyle_10"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span class="codestyle_10"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;3. Compile your program.&lt;/b&gt;&lt;br /&gt;To compile your first linux C program, launch your terminal and go to current directory where you put your hello.c code. Then, run this command:&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ gcc hello.c -o hello&lt;/pre&gt;&lt;br /&gt;After that, you will have an executable file called hello in this directory. Congratulations! you have created your first C program in linux. You can now, execute this program using this command:&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ ./hello&lt;/pre&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_QmenDvyMjlk/TBhgHjxOJTI/AAAAAAAACFs/vh6yS1te4u0/s1600/myhello.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" src="http://3.bp.blogspot.com/_QmenDvyMjlk/TBhgHjxOJTI/AAAAAAAACFs/vh6yS1te4u0/s400/myhello.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;The output will be printed on your screen. You can add more stuff and experiments. Until next time, I hope you enjoy this. Happy coding... &lt;img class="inline" src="http://coderstalk.googlepages.com/sengih.gif" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-6809534778392592950?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/-naylcRzsb4/beginning-c-programming-in-linux.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_QmenDvyMjlk/TBhgHjxOJTI/AAAAAAAACFs/vh6yS1te4u0/s72-c/myhello.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/06/beginning-c-programming-in-linux.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-2695881646173179334</guid><pubDate>Mon, 22 Feb 2010 02:31:00 +0000</pubDate><atom:updated>2010-07-13T12:50:53.168+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">coder's talk</category><category domain="http://www.blogger.com/atom/ns#">Software Engineering</category><category domain="http://www.blogger.com/atom/ns#">Computer Science</category><title>Scrum Agile Software Development: Chicken And Pig Story</title><description>Scrum is an iterative incremental framework for managing complex work (such as new product development) commonly used with Agile Software Development methodology. Although the word is not an acronym, some companies implementing the process have been known to spell it with capital letters as SCRUM. Maybe because Ken Schwaber capitalized SCRUM in the title of his early papers about this methodology.&lt;br /&gt;&lt;br /&gt;Although Scrum was intended for management of software development projects, it can be used to run software maintenance teams, or as a general project/program management approach.&lt;br /&gt;&lt;br /&gt;A number of roles are defined in Scrum. All roles fall into two distinct groups — pigs and chickens — based on the nature of their involvement in the development process. These groups get their names from a joke about a pig and a chicken opening a restaurant&lt;br /&gt;&lt;br /&gt;There are several variants as to how the Chicken and the Pig meet and the level of the relationship between the two.&lt;br /&gt;&lt;br /&gt;However, in every variant, the Chicken suggests that the two involve themselves in a scheme involving ham (or bacon) and eggs (some suggest a breakfast, others suggest a restaurant). In reply, the Pig always notes that, for the Chicken, only a contribution is required (as a chicken can simply lay an egg and then resume normal activities), while for the Pig a "total commitment" (or total sacrifice) is needed (as in order to make ham or bacon, the pig must be slaughtered).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.implementingscrum.com/2008/07/25/welcome-to-a-time-machine-future-and-past-combine-here/" target="_blank"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 141px;" src="http://4.bp.blogspot.com/_QmenDvyMjlk/S4HvSv1qE_I/AAAAAAAACA8/o5xlgrJeKSw/s400/060911-scrumtoon.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5440892930198475762" /&gt;&lt;/a&gt;&lt;br /&gt;So the “pigs” are committed to building software regularly and frequently, while everyone else is a “chicken”—interested in the project but really indifferent because if it fails they’re not the pigs—that is, they weren’t the ones that committed to doing it. The needs, desires, ideas and influences of the chicken roles are taken into account, but are not in any way allowed to affect, distort or get in the way of the actual Scrum project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;font-size:23px"&gt;“Pig” roles&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Pigs are the ones committed to the project in the Scrum process—they are the ones with “their bacon on the line” and performing the actual work of the project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scrum Master (or Facilitator)&lt;/span&gt;&lt;br /&gt;Scrum is facilitated by a Scrum Master, whose primary job is to remove impediments to the ability of the team to deliver the sprint goal. The Scrum Master is not the leader of the team (as the team is self-organizing) but acts as a buffer between the team and any distracting influences. The Scrum Master ensures that the Scrum process is used as intended. The Scrum Master is the enforcer of rules. A key part of the Scrum Master’s role is to protect the team and keep them focused on the tasks in hand.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Team&lt;/span&gt;&lt;br /&gt;The team has the responsibility to deliver the product. A team is typically made up of 5–9 people with cross-functional skills who do the actual work (design, develop, test, technical communication, etc.).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Product Owner&lt;/span&gt;&lt;br /&gt;The Product Owner represents the voice of the customer. He/she ensures that the Scrum Team works with the “right things” from a business perspective. The Product Owner writes customer-centric items (typically user stories), prioritizes them and then places them in the product backlog. A Product Owner can be a member of the Scrum Team but cannot be a ScrumMaster.&lt;br /&gt;According to original Scrum, Product Owner is in a "pig" role. However, if the Product Owner does not have involvement regularly, he/she may be considered as a "chicken" .&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;font-size:23px;"&gt;“Chicken” roles&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Chicken roles are not part of the actual Scrum process, but must be taken into account. They are people for whom the software is being built.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Stakeholders (customers, vendors)&lt;/span&gt;&lt;br /&gt;These are the people who enable the project and for whom the project will produce the agreed-upon benefit[s], which justify its production. They are only directly involved in the process during the sprint reviews.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Managers&lt;/span&gt;&lt;br /&gt;People who will set up the environment for the product development organizations.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.implementingscrum.com/2006/12/19/go-directly-to-jail-do-not-pass-go/" target="_blank"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 141px;" src="http://1.bp.blogspot.com/_QmenDvyMjlk/S4H2poCnfHI/AAAAAAAACBE/0QEDe0y3lPw/s400/061218-scrumtoon.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5440901019823733874" /&gt;&lt;/a&gt;&lt;br /&gt;That's all for now... I'm just sharing my readings about Scrum Agile Software Development. Most of these are taken from wikipedia while the cartoon was found in implementingscrum.com. Enjoy it. &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-2695881646173179334?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/UiYyCFsgkh4/scrum-agile-software-development.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_QmenDvyMjlk/S4HvSv1qE_I/AAAAAAAACA8/o5xlgrJeKSw/s72-c/060911-scrumtoon.jpg" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/02/scrum-agile-software-development.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-6414075118665582429</guid><pubDate>Sun, 14 Feb 2010 07:41:00 +0000</pubDate><atom:updated>2010-02-14T15:56:07.261+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">bash</category><category domain="http://www.blogger.com/atom/ns#">Linux shell script</category><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>How to install notify-send in ubuntu</title><description>&lt;span style="font-weight:bold;"&gt;notify-send&lt;/span&gt; is a command to send desktop notifications to a notification daemon. It is included in libnotify-bin package, which is a library that sends desktop notifications to a notification daemon, as defined in the Desktop Notifications spec. These notifications can be used to inform the user about an event or display some form of information without getting in the user's way.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QmenDvyMjlk/S3erwGAXAVI/AAAAAAAACAk/TWHbI8hUkKI/s1600-h/install-libnotify-send.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 258px;" src="http://1.bp.blogspot.com/_QmenDvyMjlk/S3erwGAXAVI/AAAAAAAACAk/TWHbI8hUkKI/s400/install-libnotify-send.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5438003917807354194" /&gt;&lt;/a&gt;&lt;br /&gt;You can install it using &lt;span style="font-weight:bold;"&gt;Synaptic Package Manager&lt;/span&gt; by searching for libnotify-bin package and install it. Or you can install it via terminal using this command:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;apogee@apogee-ubuntu:~$ sudo apt-get install libnotify-bin&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And then, you can use the notify-send command as described in my previous post about &lt;a href="http://coderstalk.blogspot.com/2010/02/custom-gnome-notification-for-your-apps.html"&gt;Custom Gnome Notification for your apps&lt;/a&gt;. Have fun!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-6414075118665582429?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/_SfOlmk_k0o/how-to-install-notify-send-in-ubuntu.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_QmenDvyMjlk/S3erwGAXAVI/AAAAAAAACAk/TWHbI8hUkKI/s72-c/install-libnotify-send.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/02/how-to-install-notify-send-in-ubuntu.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7909405436385535892</guid><pubDate>Sat, 13 Feb 2010 05:00:00 +0000</pubDate><atom:updated>2010-02-17T11:56:47.357+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">more</category><category domain="http://www.blogger.com/atom/ns#">bash</category><category domain="http://www.blogger.com/atom/ns#">Linux shell script</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><title>Custom Gnome Notification for your apps</title><description>When you run a command that would take long time to finish, you would rather do something else beside staring at the terminal to wait until it finished to do the next procedure. In my case, if I write the SD cards for my ts-7260, I would leave it and do other stuff.&lt;br /&gt;&lt;br /&gt;Since it is easy to get distracted with so many stuff on the internet, I sometimes forget to get back to check the dd terminal. This could waste my time because the process have stopped for quite long time where I should write another card instead just right after the first card finished.&lt;br /&gt;&lt;br /&gt;Therefore, I use notify-send from &lt;a href="http://coderstalk.blogspot.com/2010/02/how-to-install-notify-send-in-ubuntu.html"&gt;libnotify-bin package&lt;/a&gt; to notify me about my process while I'm free to check my mail, reading, surfing and so on. Here is the screenshot of my gnome notification when it is ready.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_QmenDvyMjlk/S3Un4BzKx1I/AAAAAAAACAA/B00DXGMA7Qc/s1600-h/custom-gnome-notification.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_QmenDvyMjlk/S3Un4BzKx1I/AAAAAAAACAA/B00DXGMA7Qc/s400/custom-gnome-notification.png"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;It can be done with one line of command like this: &lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset; height: 100px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;notify-send -i /usr/share/icons/Human/scalable/devices/media-flash.svg \&lt;br /&gt;  -h int:x:$(xrandr -q|grep '*' | sed -e 's/x.*//' -e 's/\ //g') \&lt;br /&gt;  -h int:y:10 -u normal -t 10000 "Copy SD card from dd Image" \&lt;br /&gt;  "dd image to /dev/sdd finished"'!' ; mplayer /usr/share/sounds/purple/receive.wav &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;However, the above command is long and I wouldn't dare to type this command every time I will write new SD card. As usual, the lazy programmer would make a bash script for this repetitive task:&lt;br /&gt;&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset; height: 430px; margin: 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;"&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;#!/bin/bash&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;# default device name&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #2040a0;"&gt;mydev&lt;/span&gt;=&lt;span style="color: green;"&gt;"/dev/sdd"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;# the icon &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #2040a0;"&gt;sd_icon&lt;/span&gt;=&lt;span style="color: green;"&gt;"/usr/share/icons/Human/scalable/devices/media-flash.svg"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;# check my command arguments &lt;/span&gt;&lt;br /&gt;if [ &lt;span style="color: #2040a0;"&gt;$#&lt;/span&gt; -gt 0 ]; then&lt;br /&gt;  &lt;span style="color: #2040a0;"&gt;mydev&lt;/span&gt;=&lt;span style="color: #2040a0;"&gt;$1&lt;/span&gt;&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;# create the message &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #2040a0;"&gt;mymsg&lt;/span&gt;=&lt;span style="color: green;"&gt;"dd image to &lt;span style="color: #2040a0;"&gt;$mydev&lt;/span&gt; finished"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #2040a0;"&gt;mytitle&lt;/span&gt;=&lt;span style="color: green;"&gt;"Copying SD card image"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;# get my resolution&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #2040a0;"&gt;myres&lt;/span&gt;=$(xrandr -q|grep '*' | sed -e 's/x.*//' -e 's/\ //g')&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;# the sound&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #2040a0;"&gt;mysound&lt;/span&gt;=&lt;span style="color: green;"&gt;"/usr/share/sounds/purple/receive.wav"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;# and the notify command&lt;/span&gt;&lt;br /&gt;notify-send -i &lt;span style="color: #2040a0;"&gt;$sd_icon&lt;/span&gt; -h int:x:&lt;span style="color: #2040a0;"&gt;$myres&lt;/span&gt; -h int:y:10 -u normal -t 10000 &lt;span style="color: green;"&gt;"&lt;span style="color: #2040a0;"&gt;$mytitle&lt;/span&gt;"&lt;/span&gt; &lt;span style="color: green;"&gt;"&lt;span style="color: #2040a0;"&gt;$mymsg&lt;/span&gt;"&lt;/span&gt;'!' &amp;amp; mplayer &lt;span style="color: #2040a0;"&gt;$mysound  &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;After copying to &lt;code&gt;/usr/bin&lt;/code&gt; and change the mode to +x like this:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;apogee-ubuntubox:$ sudo cp notifyme.sh /usr/bin/&lt;br /&gt;apogee-ubuntubox:$ sudo chmod +x /usr/bin/notifyme.sh&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, we can run the script like this:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;apogee-ubuntubox:$ sudo dd if=myddimage.dd of=/dev/sdc ; notifyme.sh /dev/sdc&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Therefore, when the dd process finished, the notification will pop and the sound will play. You can also download the code here: &lt;a href="http://coderstalk.googlecode.com/svn/trunk/bash-scripts/notifyme.sh"&gt;notifyme.sh&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's all for today... see you later! &lt;img class="inline" src="http://coderstalk.googlepages.com/tongue.gif" /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7909405436385535892?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/nfeXv-EN34Y/custom-gnome-notification-for-your-apps.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_QmenDvyMjlk/S3Un4BzKx1I/AAAAAAAACAA/B00DXGMA7Qc/s72-c/custom-gnome-notification.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/02/custom-gnome-notification-for-your-apps.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-2206233260526414492</guid><pubDate>Thu, 04 Feb 2010 05:38:00 +0000</pubDate><atom:updated>2010-02-11T10:50:50.611+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><title>Print Active Network Interface List in Linux using Python</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_QmenDvyMjlk/S3Nwd6Lh7mI/AAAAAAAAB-c/4RlL5MO5R4o/s1600-h/python-logo-glassy.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 157px; height: 200px;" src="http://2.bp.blogspot.com/_QmenDvyMjlk/S3Nwd6Lh7mI/AAAAAAAAB-c/4RlL5MO5R4o/s200/python-logo-glassy.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5436812834302455394" /&gt;&lt;/a&gt;&lt;br /&gt;I'm checking the replies of my previous code on &lt;a href="http://coderstalk.blogspot.com/2010/02/create-network-interfaces-list-using.html"&gt;Create network interfaces list using Python&lt;/a&gt;. &lt;b&gt;E A Faisal&lt;/b&gt; suggestion to use &lt;code&gt;/proc/net/dev&lt;/code&gt; is somehow seems interesting to me. Now, let's do some python code for fun before going out to lunch.&lt;br /&gt;&lt;br /&gt;Here is my code to get the same result as my previous &lt;a href="http://coderstalk.blogspot.com/2010/02/create-network-interfaces-list-using.html"&gt;python code to list the network interfaces&lt;/a&gt;:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 480px; text-align: left;"&gt;&lt;font color="#444444"&gt;#!/usr/bin/python&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# read the file /proc/net/dev&lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;f&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;open&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;'/proc/net/dev'&lt;/font&gt;,&lt;font color="#008000"&gt;'r'&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# put the content to list&lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;ifacelist&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;f&lt;/font&gt;.&lt;font color="#2040a0"&gt;read&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;.&lt;font color="#2040a0"&gt;split&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;'\n'&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# close the file&lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;f&lt;/font&gt;.&lt;font color="#2040a0"&gt;close&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# remove 2 lines header&lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;ifacelist&lt;/font&gt;.&lt;font color="#2040a0"&gt;pop&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;ifacelist&lt;/font&gt;.&lt;font color="#2040a0"&gt;pop&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# loop to check each line&lt;/font&gt;&lt;br /&gt;&lt;strong&gt;for&lt;/strong&gt; &lt;font color="#2040a0"&gt;line&lt;/font&gt; &lt;strong&gt;in&lt;/strong&gt; &lt;font color="#2040a0"&gt;ifacelist&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;font color="#2040a0"&gt;ifacedata&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;line&lt;/font&gt;.&lt;font color="#2040a0"&gt;replace&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;' '&lt;/font&gt;,&lt;font color="#008000"&gt;''&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;.&lt;font color="#2040a0"&gt;split&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;':'&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;font color="#444444"&gt;# check the data have 2 elements&lt;/font&gt;&lt;br /&gt;    &lt;strong&gt;if&lt;/strong&gt; &lt;font color="#2040a0"&gt;len&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ifacedata&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;2&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;        &lt;font color="#444444"&gt;# check the interface is up (Transmit/Receive data)&lt;/font&gt;&lt;br /&gt;        &lt;strong&gt;if&lt;/strong&gt; &lt;font color="#2040a0"&gt;int&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ifacedata&lt;/font&gt;&lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="#FF0000"&gt;1&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;            &lt;font color="#444444"&gt;# print the interface&lt;/font&gt;&lt;br /&gt;            &lt;strong&gt;print&lt;/strong&gt; &lt;font color="#2040a0"&gt;ifacedata&lt;/font&gt;&lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Seems like it is working on my ubuntu linux (in the office &lt;img class='inline' src='http://coderstalk.googlepages.com/tongue.gif'/&gt;). I believe it should possibly work on other linux without any issue with that SIOCGIFCONF and ioctl. And the code is even simpler. &lt;br /&gt;&lt;br /&gt;That's all for now... I'm going out for lunch. Happy python coding! &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-2206233260526414492?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/nicXaTDwmtw/print-active-network-interface-list-in.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_QmenDvyMjlk/S3Nwd6Lh7mI/AAAAAAAAB-c/4RlL5MO5R4o/s72-c/python-logo-glassy.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/02/print-active-network-interface-list-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-3268978123239877273</guid><pubDate>Wed, 03 Feb 2010 22:16:00 +0000</pubDate><atom:updated>2010-02-11T11:00:49.386+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><title>Create network interfaces list using Python</title><description>While checking my email this morning, I found a python question on python.my mailing list which sound like this:&lt;br /&gt;&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 310px; text-align: left;"&gt;Date: Wed, 3 Feb 2010 23:48:10 +0800&lt;br /&gt;Message-ID: &amp;lt;52d26d931002030748pd2c6321p1290b1eeee703...@mail.gmail.com&gt;&lt;br /&gt;Subject: showing interfaces&lt;br /&gt;From: Umarzuki Mochlis &amp;lt;umarz...@gmail.com&gt;&lt;br /&gt;To: pythonmy@googlegroups.com&lt;br /&gt;&lt;br /&gt;Hi all,&lt;br /&gt;&lt;br /&gt;I wonder how I can output network interfaces with python the same &lt;br /&gt;way I can with these commands on linux&lt;br /&gt;&lt;br /&gt;sudo ifconfig | cut -d " " -f 1 &gt; ifconfig.txt&lt;br /&gt;sed '/ *#/d; /^ *$/d' &amp;lt; ifconfig.txt&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Umarzuki Mochlis&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;For those who couldn't imagine the output of those two lines command in the question, here is the explanation:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The first command write to 'ifconfig.txt' the name of up interfaces which comes from ifconfig output and remove other unwanted informations.&lt;/li&gt;&lt;li&gt;the second line read the 'ifconfig.txt' file, remove empty lines and print the list on the screen.&lt;/li&gt;&lt;/ul&gt;You can read the discussion thread on &lt;a href="http://groups.google.com/group/pythonmy/browse_thread/thread/d6b9354fe6311a0c"&gt;python.my mailing list: showing interfaces&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Answer:&lt;/b&gt;&lt;br /&gt;Here is how you can create network interfaces list with python:&lt;br /&gt;&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 580px; text-align: left;"&gt;&lt;strong&gt;import&lt;/strong&gt; &lt;font color="#2040a0"&gt;array&lt;/font&gt;&lt;br /&gt;&lt;strong&gt;import&lt;/strong&gt; &lt;font color="#2040a0"&gt;struct&lt;/font&gt;&lt;br /&gt;&lt;strong&gt;import&lt;/strong&gt; &lt;font color="#2040a0"&gt;socket&lt;/font&gt;&lt;br /&gt;&lt;strong&gt;import&lt;/strong&gt; &lt;font color="#2040a0"&gt;fcntl&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;SIOCGIFCONF&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;0x8912&lt;/font&gt;  &lt;font color="#444444"&gt;#define SIOCGIFCONF&lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;BYTES&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;4096&lt;/font&gt;          &lt;font color="#444444"&gt;# Simply define the byte size&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# get_iface_list function definition &lt;/font&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# this function will return array of all 'up' interfaces &lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;def&lt;/font&gt; &lt;font color="#2040a0"&gt;get_iface_list&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;br /&gt;    &lt;font color="#444444"&gt;# create the socket object to get the interface list&lt;/font&gt;&lt;br /&gt;    &lt;font color="#2040a0"&gt;sck&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;socket&lt;/font&gt;.&lt;font color="#2040a0"&gt;socket&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;socket&lt;/font&gt;.&lt;font color="#2040a0"&gt;AF_INET&lt;/font&gt;, &lt;font color="#2040a0"&gt;socket&lt;/font&gt;.&lt;font color="#2040a0"&gt;SOCK_DGRAM&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;font color="#444444"&gt;# prepare the struct variable&lt;/font&gt;&lt;br /&gt;    &lt;font color="#2040a0"&gt;names&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;array&lt;/font&gt;.&lt;font color="#2040a0"&gt;array&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;'B'&lt;/font&gt;, &lt;font color="#008000"&gt;'\0'&lt;/font&gt; &lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;BYTES&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;font color="#444444"&gt;# the trick is to get the list from ioctl&lt;/font&gt;&lt;br /&gt;    &lt;font color="#2040a0"&gt;bytelen&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;struct&lt;/font&gt;.&lt;font color="#2040a0"&gt;unpack&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;'iL'&lt;/font&gt;, &lt;font color="#2040a0"&gt;fcntl&lt;/font&gt;.&lt;font color="#2040a0"&gt;ioctl&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;sck&lt;/font&gt;.&lt;font color="#2040a0"&gt;fileno&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;, &lt;font color="#2040a0"&gt;SIOCGIFCONF&lt;/font&gt;, &lt;font color="#2040a0"&gt;struct&lt;/font&gt;.&lt;font color="#2040a0"&gt;pack&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;'iL'&lt;/font&gt;, &lt;font color="#2040a0"&gt;BYTES&lt;/font&gt;, &lt;font color="#2040a0"&gt;names&lt;/font&gt;.&lt;font color="#2040a0"&gt;buffer_info&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;font color="#444444"&gt;# convert it to string&lt;/font&gt;&lt;br /&gt;    &lt;font color="#2040a0"&gt;namestr&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;names&lt;/font&gt;.&lt;font color="#2040a0"&gt;tostring&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;font color="#444444"&gt;# return the interfaces as array&lt;/font&gt;&lt;br /&gt;    &lt;strong&gt;return&lt;/strong&gt; &lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="#2040a0"&gt;namestr&lt;/font&gt;&lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="#2040a0"&gt;i&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="#2040a0"&gt;i&lt;/font&gt;&lt;font color="4444FF"&gt;+&lt;/font&gt;&lt;font color="#FF0000"&gt;32&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt;.&lt;font color="#2040a0"&gt;split&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#008000"&gt;'\0'&lt;/font&gt;, &lt;font color="#FF0000"&gt;1&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;[&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt; &lt;strong&gt;for&lt;/strong&gt; &lt;font color="#2040a0"&gt;i&lt;/font&gt; &lt;strong&gt;in&lt;/strong&gt; &lt;font color="#2040a0"&gt;range&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;, &lt;font color="#2040a0"&gt;bytelen&lt;/font&gt;, &lt;font color="#FF0000"&gt;32&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;]&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# now, use the function to get the 'up' interfaces array&lt;/font&gt;&lt;br /&gt;&lt;font color="#2040a0"&gt;ifaces&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;get_iface_list&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#444444"&gt;# well, what to do? print it out maybe... &lt;/font&gt;&lt;br /&gt;&lt;strong&gt;for&lt;/strong&gt; &lt;font color="#2040a0"&gt;iface&lt;/font&gt; &lt;strong&gt;in&lt;/strong&gt; &lt;font color="#2040a0"&gt;ifaces&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;br /&gt; &lt;strong&gt;print&lt;/strong&gt; &lt;font color="#2040a0"&gt;iface&lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_QmenDvyMjlk/S3NxLRIJP1I/AAAAAAAAB-k/ec2PYmVWcDI/s1600-h/python-logo-glassy2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 199px;" src="http://4.bp.blogspot.com/_QmenDvyMjlk/S3NxLRIJP1I/AAAAAAAAB-k/ec2PYmVWcDI/s200/python-logo-glassy2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5436813613556383570" /&gt;&lt;/a&gt;This code is tested to be working in my ubuntu linux. Since I made SIOCGIFCONF ioctl number (0x8912) hardcoded, it may seems broken on other UNIX like system. However, you may modified the code to be compatible with your system when you understand it. I hope this snippet can help others too. Enjoy coding! &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-3268978123239877273?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/WrGjC4vK4yY/create-network-interfaces-list-using.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_QmenDvyMjlk/S3NxLRIJP1I/AAAAAAAAB-k/ec2PYmVWcDI/s72-c/python-logo-glassy2.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2010/02/create-network-interfaces-list-using.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-2320989547986140664</guid><pubDate>Tue, 15 Dec 2009 10:48:00 +0000</pubDate><atom:updated>2009-12-15T19:10:44.504+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">bash</category><title>Howto Backup and Restore SD card image with tar and dd</title><description>Just my quick post today... I'm quite busy these days...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_QmenDvyMjlk/SyduQPXiZqI/AAAAAAAAB84/19hdDRYosh8/s1600-h/tar-dd.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 298px;" src="http://4.bp.blogspot.com/_QmenDvyMjlk/SyduQPXiZqI/AAAAAAAAB84/19hdDRYosh8/s400/tar-dd.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5415418302218528418" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I normally backup my embedded system SD card image using dd and the output size will be 969M. To reduce the size, I'm using tar and gzip to compress the image file. Here is the command:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;# dd if=/dev/sdd of=sd1gb.dd&lt;br /&gt;$ tar zcvf sd1gb.dd.tar.gz&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This way I will have the image in tar.gz file which is only 218MB. And delete the dd file.&lt;br /&gt;&lt;br /&gt;However, to use the tar.gz, we don't have to extract the file because we can only use a single command like this:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;# tar Ozxf sd1gb.dd.tar.gz | dd of=/dev/sdd&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That's all for today... &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt; see u later!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-2320989547986140664?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/YgXtvECnxF0/howto-backup-and-restore-sd-card-image.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_QmenDvyMjlk/SyduQPXiZqI/AAAAAAAAB84/19hdDRYosh8/s72-c/tar-dd.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/12/howto-backup-and-restore-sd-card-image.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7697171444008959755</guid><pubDate>Sat, 14 Nov 2009 02:02:00 +0000</pubDate><atom:updated>2009-11-14T12:40:46.414+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">blogspot hack</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><category domain="http://www.blogger.com/atom/ns#">how to</category><category domain="http://www.blogger.com/atom/ns#">HTML</category><title>How to Create Hyperlink on Blogger Header</title><description>Today, I got this question in comment of my previous tutorial on &lt;a href="http://coderstalk.blogspot.com/2008/04/how-to-create-hyperlink-on-blogger-post.html" target="_blank"&gt;How to Create Hyperlink on Blogger Post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://coderstalk.blogspot.com/2008/04/how-to-create-hyperlink-on-blogger-post.html#comment-5292197939025391231"&gt;Barbara Fowlds L.Ac.&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;:&lt;/span&gt; &lt;span style="color: rgb(102, 51, 51); font-weight: bold;"&gt;"Can I put a hyperlink in my header of my blogspot blog and if so how?"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My answer is Yes you can. And here's how to do it in the simplest newbie way.&lt;br /&gt;&lt;br /&gt;Before that, I assume you may wanted to add this hyperlink on your Blogger Header Description because maybe you want to invite your visitor to your business website or any other sites you have. For example, I may like to invite my blog reader to read my art blog at http://artofapogee.blogspot.com and my blog description says something like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Feel free to visit &lt;span style="color: rgb(51, 51, 255);"&gt;Art Of ApOgEE Blog&lt;/span&gt; to see my arts and order some graphic design books&lt;/blockquote&gt;&lt;br /&gt;And now we wanna link that blue "Art Of ApOgEE Blog" to &lt;code&gt;http://artofapogee.blogspot.com&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This is the simplest way. You just have to copy paste and no coding &lt;img class="inline" src="http://coderstalk.googlepages.com/tongue.gif" /&gt;. Here's the step:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open up New Post on you blogger, select Edit Html and type the words there:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QmenDvyMjlk/Sv4nAe9RZiI/AAAAAAAAB5E/Qy1EznoNQPQ/s1600-h/new-post.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 297px;" src="http://3.bp.blogspot.com/_QmenDvyMjlk/Sv4nAe9RZiI/AAAAAAAAB5E/Qy1EznoNQPQ/s400/new-post.png" alt="" id="BLOGGER_PHOTO_ID_5403799492154713634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select the text we want to link and create the link:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QmenDvyMjlk/Sv4n2E02jbI/AAAAAAAAB5M/nvzGREkxtTc/s1600-h/create-link.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 311px;" src="http://3.bp.blogspot.com/_QmenDvyMjlk/Sv4n2E02jbI/AAAAAAAAB5M/nvzGREkxtTc/s400/create-link.png" alt="" id="BLOGGER_PHOTO_ID_5403800412853013938" border="0" /&gt;&lt;/a&gt; Just follow the same way like we did in &lt;a href="http://coderstalk.blogspot.com/2008/04/how-to-create-hyperlink-on-blogger-post.html" target="_blank"&gt;How to Create Hyperlink on Blogger Post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select all text and copy:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QmenDvyMjlk/Sv4oiU0_zFI/AAAAAAAAB5U/rddFUbTsr_0/s1600-h/select-all-copy.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 313px;" src="http://1.bp.blogspot.com/_QmenDvyMjlk/Sv4oiU0_zFI/AAAAAAAAB5U/rddFUbTsr_0/s400/select-all-copy.png" alt="" id="BLOGGER_PHOTO_ID_5403801173062831186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Open the Layout tab and Edit your header:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QmenDvyMjlk/Sv4qsXsFMZI/AAAAAAAAB5c/NUC-mw1eFSk/s1600-h/edit-header.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 167px;" src="http://3.bp.blogspot.com/_QmenDvyMjlk/Sv4qsXsFMZI/AAAAAAAAB5c/NUC-mw1eFSk/s400/edit-header.png" alt="" id="BLOGGER_PHOTO_ID_5403803544652689810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Paste the copied text to your Blog Description and Save:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QmenDvyMjlk/Sv4rUS_LTKI/AAAAAAAAB5k/5TgvkeB4Iow/s1600-h/blog-description.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 371px; height: 400px;" src="http://1.bp.blogspot.com/_QmenDvyMjlk/Sv4rUS_LTKI/AAAAAAAAB5k/5TgvkeB4Iow/s400/blog-description.png" alt="" id="BLOGGER_PHOTO_ID_5403804230585371810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That's all, now you have the link on your Blogger Header Description. Enjoy coding and Happy Blogging!! &lt;img class="inline" src="http://coderstalk.googlepages.com/sengih.gif" /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;div style="padding: 10px; background-color: rgb(255, 250, 218);"&gt;&lt;b&gt;You may also love to read:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href='http://coderstalk.blogspot.com/2008/04/how-to-create-hyperlink-on-blogger-post.html' target='_blank'&gt;How to Create Hyperlink on Blogger Post&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://coderstalk.blogspot.com/2007/07/how-to-show-and-hide-text-in-blog-post.html' target='_blank'&gt;How to Show and Hide Text in Blog Post&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://coderstalk.blogspot.com/2008/02/how-to-show-and-hide-text-in-blog-post.html' target='_blank'&gt;How to Show and Hide Text in Blog Post with teaser&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://coderstalk.blogspot.com/2008/06/how-to-create-expandable-post-summaries.html" target="_blank"&gt;How to create expandable post summaries in Blogger&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7697171444008959755?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/LOYBBgW5SkU/how-to-create-hyperlink-on-blogger.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_QmenDvyMjlk/Sv4nAe9RZiI/AAAAAAAAB5E/Qy1EznoNQPQ/s72-c/new-post.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/11/how-to-create-hyperlink-on-blogger.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-2881980740360740700</guid><pubDate>Fri, 13 Nov 2009 01:00:00 +0000</pubDate><atom:updated>2009-11-13T10:15:27.132+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">LISP</category><title>Beginning LISP Programming in Ubuntu</title><description>For any reason, you may wanted to start &lt;span style="font-weight:bold;"&gt;learning Lisp Programming&lt;/span&gt;. However, you may wondering where to start. So here again, I'm going to share with you. How to begin Lisp Programming, "the programmable programming language".&lt;br /&gt;&lt;br /&gt;As, I'm using Ubuntu here, this example is shown step by step on Ubuntu. &lt;br /&gt;&lt;br /&gt;In order to start playing with Lisp on your ubuntu, you need to install CMUCL. CMUCL is a free implementation of Common Lisp which was originally developed at Carnegie Mellon University. To install CMUCL package, just run this command on your Ubuntu terminal:&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ sudo apt-get install cmucl&lt;/pre&gt;&lt;br /&gt;Next, we are going to feel the environment. Open up your terminal and type:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ lisp&lt;/pre&gt;&lt;br /&gt;You will be greeted by CMU Common Lisp with it version and loaded subsystem. In my case, I see like this.&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;apogee@apogee-ubuntu:~$ lisp&lt;br /&gt;CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian patches, running on apogee-ubuntu&lt;br /&gt;With core: /usr/lib/cmucl/lisp.core&lt;br /&gt;Dumped on: Fri, 2009-11-13 09:05:47+08:00 on apogee-ubuntu&lt;br /&gt;For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS.&lt;br /&gt;or to pvaneynd@debian.org&lt;br /&gt;type (help) for help, (quit) to exit, and (demo) to see the demos&lt;br /&gt;&lt;br /&gt;Loaded subsystems:&lt;br /&gt;    Python 1.1, target Intel x86&lt;br /&gt;    CLOS based on Gerd's PCL 2004/04/14 03:32:47&lt;br /&gt;* &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see the loaded subsystem is Python 1.1. This is not the Python as in &lt;a href="http://coderstalk.blogspot.com/search/label/python"&gt;Python Programming&lt;/a&gt;. Don't get confused. It is a native code compiler named "Python". If Common Lisp source code has been written with appropriate declarations and is organized with speed in mind, the Python compiler generates code that is almost free from overhead compared to code compiled from languages like C++. Some inefficiencies such as function call interfaces and lack of pointer-free arrays of user-defined data types are dictated by the Common Lisp standard and still need to be worked around (e.g. by inlining more and using macros to build constructs that look like user-defined structures but are actually accessing fields in preallocated specialized arrays). The Python compiler also features powerful type inferences, helping the programmer in writing overhead-free code by either inferring types automatically or issuing hints about missed optimization opportunities. &lt;br /&gt;&lt;br /&gt;Before doing anything else, you have to know how to exit from this environment. To exit from this lisp terminal, you can simply type &lt;span style="font-weight:bold;"&gt;(quit)&lt;/span&gt; and press enter.&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;apogee@apogee-ubuntu:~$ lisp&lt;br /&gt;CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian patches, running on apogee-ubuntu&lt;br /&gt;With core: /usr/lib/cmucl/lisp.core&lt;br /&gt;Dumped on: Fri, 2009-11-13 09:05:47+08:00 on apogee-ubuntu&lt;br /&gt;For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS.&lt;br /&gt;or to pvaneynd@debian.org&lt;br /&gt;type (help) for help, (quit) to exit, and (demo) to see the demos&lt;br /&gt;&lt;br /&gt;Loaded subsystems:&lt;br /&gt;    Python 1.1, target Intel x86&lt;br /&gt;    CLOS based on Gerd's PCL 2004/04/14 03:32:47&lt;br /&gt;* (quit)&lt;br /&gt;apogee@apogee-ubuntu:~$ &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now you know how to start and end the CMU Common Lisp. We can start playing with codes. Here is some example:&lt;br /&gt;&lt;br /&gt;1. Adding Numbers:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;* (+ 200 800 300 700 19 10)&lt;br /&gt;&lt;br /&gt;2029&lt;br /&gt;* &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice my code started with '(' and end with ')'. &lt;br /&gt;&lt;br /&gt;2. Subtract Numbers:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;* (* 12 2 3)&lt;br /&gt;&lt;br /&gt;72&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;3. Or even Adding and Subtract:&lt;br /&gt;&lt;br /&gt;&lt;pre id="linuxterm"&gt;* (+ (* 12 2 3) 1)&lt;br /&gt;&lt;br /&gt;73&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There you go. From here you can try more stuff by following these tutorials and manual:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cs.sfu.ca/CC/310/pwfong/Lisp/1/tutorial1.html" target="_blank"&gt;Lisp Tutorial: Basic Lisp Programming&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.apl.jhu.edu/~hall/lisp.html" target="_blank"&gt;An Introduction and Tutorial for Common Lisp&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://gigamonkeys.com/book/" target="_blank"&gt;Practical Common Lisp&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://xahlee.org/emacs/elisp.html" target="_blank"&gt;Xah's Emacs Lisp Tutorial&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://common-lisp.net/project/cmucl/doc/cmu-user/" target="_blank"&gt;CMUCL User's Manual&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;That's all for now mates.. Happy Coding!!&lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-2881980740360740700?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/vyOEHi1bduQ/beginning-lisp-programming-in-ubuntu.html</link><author>noreply@blogger.com (ApOgEE)</author><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/11/beginning-lisp-programming-in-ubuntu.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7536358080990135919</guid><pubDate>Wed, 04 Nov 2009 08:10:00 +0000</pubDate><atom:updated>2010-02-11T10:56:32.444+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">python</category><title>Example of Simple Web Server Using Python</title><description>I may got the question wrong on &lt;a href="http://coderstalk.blogspot.com/2009/11/example-of-simple-website-using-python.html"&gt;my previous post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So, here is how to make a simple web server using python in ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open up your ubuntu terminal and create the 'index.html' file like this:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 170px; text-align: left;"&gt;&amp;lt;html&gt;&lt;br /&gt;&amp;lt;head&gt;&amp;lt;title&gt;python.my sample&amp;lt;/title&gt;&amp;lt;/head&gt;&lt;br /&gt;&amp;lt;body&gt;&lt;br /&gt;&amp;lt;h1&gt;python.my sample&amp;lt;/h1&gt;&lt;br /&gt;&amp;lt;p&gt;This is the simple html sample. Got it?&amp;lt;/p&gt;&lt;br /&gt;&amp;lt;p&gt;Visit &amp;lt;a href="http://coderstalk.blogspot.com"&gt;Coder's Talk blog&amp;lt;/a&gt;&amp;lt;/p&gt;&lt;br /&gt;&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the same directory, create the python server and name it as 'pyserver.py' and enter the content like this:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 170px; text-align: left;"&gt;import SimpleHTTPServer&lt;br /&gt;import SocketServer&lt;br /&gt;&lt;br /&gt;theport = 1234&lt;br /&gt;Handler = SimpleHTTPServer.SimpleHTTPRequestHandler&lt;br /&gt;pywebserver = SocketServer.TCPServer(("", theport), Handler)&lt;br /&gt;&lt;br /&gt;print "Python based web server. Serving at port", theport&lt;br /&gt;pywebserver.serve_forever()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Run the python code using this command:&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ python pyserver.py&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Open up your web browser and go to &lt;a href="http://localhost:1234" target="_blank"&gt;http://localhost:1234&lt;/a&gt; and see your python web server running.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That's all... Have fun coding &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QmenDvyMjlk/S3NxyH0JnBI/AAAAAAAAB-s/2EqhQUQUmnw/s1600-h/python-simplehttpserver.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 320px;" src="http://3.bp.blogspot.com/_QmenDvyMjlk/S3NxyH0JnBI/AAAAAAAAB-s/2EqhQUQUmnw/s400/python-simplehttpserver.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5436814281071500306" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7536358080990135919?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/H5yxoSe9_E4/example-of-simple-web-server-using.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_QmenDvyMjlk/S3NxyH0JnBI/AAAAAAAAB-s/2EqhQUQUmnw/s72-c/python-simplehttpserver.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/11/example-of-simple-web-server-using.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-1371181454822949412</guid><pubDate>Wed, 04 Nov 2009 06:55:00 +0000</pubDate><atom:updated>2010-02-11T11:01:32.692+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">web master</category><category domain="http://www.blogger.com/atom/ns#">python</category><title>Example of Simple Website Using Python</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_QmenDvyMjlk/S3NxLRIJP1I/AAAAAAAAB-k/ec2PYmVWcDI/s1600-h/python-logo-glassy2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 199px;" src="http://4.bp.blogspot.com/_QmenDvyMjlk/S3NxLRIJP1I/AAAAAAAAB-k/ec2PYmVWcDI/s200/python-logo-glassy2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5436813613556383570" /&gt;&lt;/a&gt;While reading my email today, found this question from one of the python.my mailing list subscriber. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Question:&lt;/b&gt; i want to run a web server using python&lt;br /&gt;can expertise in python share some simple codes with html as well to&lt;br /&gt;demonstrate this. &lt;a href="http://groups.google.com.my/group/pythonmy/browse_thread/thread/a76b59b8de5b2f1f?hl=en" target="_blank"&gt;[link to python.my thread]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Answer:&lt;/b&gt; As I'm bored today coz Kristen didn't answer my email yet, I pop my ubuntu terminal and type this code:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 760px; text-align: left;"&gt;## =========================================================&lt;br /&gt;# Sample python site by ApOgEE&lt;br /&gt;# ----------------------------&lt;br /&gt;# 1) Make sure you have apache and enable mod-python on your apache. For example on ubuntu:&lt;br /&gt;#    $ sudo apt-get install apache2&lt;br /&gt;#    $ sudo apt-get install libapache2-mod-python&lt;br /&gt;#    $ sudo a2enmod python&lt;br /&gt;#&lt;br /&gt;# 2) Make sure you have proper PythonHandler. For example:&lt;br /&gt;# AddHandler mod_python .py&lt;br /&gt;# PythonHandler mod_python.publisher&lt;br /&gt;# PythonDebug On&lt;br /&gt;#&lt;br /&gt;# 3) Enter this codes and name it as 'pythonmysample.py' on your web directory&lt;br /&gt;#&lt;br /&gt;# 4) test it on your browser http://localhost/pythonmysample.py&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;def index(req):&lt;br /&gt;    thetitle = "Python.my sample by ApOgEE"&lt;br /&gt;    mysite = siteheader(thetitle)&lt;br /&gt;    mysite += sitebody(thetitle)&lt;br /&gt;    mysite += sitefoot()&lt;br /&gt;    return mysite &lt;br /&gt;&lt;br /&gt;def siteheader(title):&lt;br /&gt;    str = "&amp;lt;html&gt;&amp;lt;head&gt;&amp;lt;title&gt;" + title + "\n"&lt;br /&gt;    str += "&amp;lt;/title&gt;&amp;lt;/head&gt;&amp;lt;body&gt;\n"&lt;br /&gt;    return str&lt;br /&gt;&lt;br /&gt;def sitefoot():&lt;br /&gt;    str = "\n&amp;lt;/body&gt;&amp;lt;/html&gt;"&lt;br /&gt;    return str&lt;br /&gt;&lt;br /&gt;def sitebody(title):&lt;br /&gt;    str = "&amp;lt;h1&gt;" + title + "&amp;lt;/h1&gt;\n"&lt;br /&gt;    str += "&amp;lt;p&gt;Hi mate!&amp;lt;br&gt;\n" + \&lt;br /&gt;           "This is the testing python site example.&amp;lt;br&gt;&amp;lt;br&gt;" + \&lt;br /&gt;    "Coded by: ApOgEE&amp;lt;br&gt;" + \&lt;br /&gt;    "Visit &amp;lt;a href=\"http://coderstalk.blogspot.com\"&gt;http://coderstalk.blogspot.com&amp;lt;/a&gt;&lt;/p&gt;\n"&lt;br /&gt;    return str&lt;br /&gt;&lt;br /&gt;# end of code. Copyright (C) 2009, ApOgEE - http://coderstalk.blogspot.com&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you have problem opening the page on your ubuntu, here is the checklist:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install apache2 and libapache2-mod-python and enable mod-python&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ sudo apt-get install apache2&lt;br /&gt;$ sudo apt-get install libapache2-mod-python&lt;br /&gt;$ sudo a2enmod python&lt;/pre&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Edit /etc/apache2/sites-enabled/000-default. Search for this lines:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 130px; text-align: left;"&gt;        &amp;lt;Directory /var/www/&gt;&lt;br /&gt;                Options Indexes FollowSymLinks MultiViews&lt;br /&gt;                AllowOverride None&lt;br /&gt;                Order allow,deny&lt;br /&gt;                allow from all&lt;br /&gt;        &amp;lt;/Directory&gt;&lt;br /&gt;&lt;/pre&gt;and add python handler like this:&lt;br /&gt;&lt;pre dir="ltr" style="border: 1px inset ; margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 220px; text-align: left;"&gt;        &amp;lt;Directory /var/www/&gt;&lt;br /&gt;                Options Indexes FollowSymLinks MultiViews&lt;br /&gt;                AllowOverride None&lt;br /&gt;                Order allow,deny&lt;br /&gt;                allow from all&lt;br /&gt;                &lt;font color="red"&gt;&lt;br /&gt;                AddHandler mod_python .py&lt;br /&gt;                PythonHandler mod_python.publisher&lt;br /&gt;                PythonDebug On&lt;br /&gt;                &lt;/font&gt;&lt;br /&gt;        &amp;lt;/Directory&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Restart your apache&lt;br /&gt;&lt;pre id="linuxterm"&gt;$ sudo /etc/init.d/apache2 restart&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;You can also download the &lt;a href="http://coderstalk.googlecode.com/svn/trunk/sample-python-website/samplesite.py"&gt;simple python website source code&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;That's all. Hope you enjoy it... Happy Coding!! &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-1371181454822949412?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/8BDDlOU25gQ/example-of-simple-website-using-python.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_QmenDvyMjlk/S3NxLRIJP1I/AAAAAAAAB-k/ec2PYmVWcDI/s72-c/python-logo-glassy2.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/11/example-of-simple-website-using-python.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7176220728693401350</guid><pubDate>Thu, 22 Oct 2009 02:38:00 +0000</pubDate><atom:updated>2009-10-22T12:18:18.076+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">more</category><category domain="http://www.blogger.com/atom/ns#">Cheat Code</category><category domain="http://www.blogger.com/atom/ns#">VBScript</category><category domain="http://www.blogger.com/atom/ns#">Visual basic</category><category domain="http://www.blogger.com/atom/ns#">Windows XP</category><title>List Windows XP Running Process And ProcessID in VBScript</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_QmenDvyMjlk/St_Qa6pvvMI/AAAAAAAAB3Q/Pg5wxk8XU6g/s1600-h/showproc.PNG"&gt;&lt;img style="float:left; margin:0 10px 0px 0;cursor:pointer; cursor:hand;width: 150px; height: 400px;" src="http://4.bp.blogspot.com/_QmenDvyMjlk/St_Qa6pvvMI/AAAAAAAAB3Q/Pg5wxk8XU6g/s400/showproc.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5395260039452671170" /&gt;&lt;/a&gt;One of my reason why I hate Windows XP is because it is prone to virus. However, I can't escape from using it because there are instruments which I use that can only communicate with it's own proprietary windows program. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Love it or not, I still need these proprietary programs to run in the windows box on site because they don't have linux version of it nor even going to have it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Leaving the windows box like that. I believe in some way, it will get infected when some user access the box to grab some data with their infected USB drive or there is virus in the network. It simply happened last two weeks on the site box where this virus prevent me to open the Windows Task Manager to show what process is running in the box.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks to VBScript which allows me to view the running process and investigate. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, after getting frustated and cursing the virus prone OS for some time, I just open Notepad program and begin writing this script:&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color=black&gt;&lt;pre dir="ltr" style="border: 1px inset rgb(0, 0, 0); margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 300px; text-align: left; "&gt;&lt;font color="#008000"&gt;'==========================================================='&lt;br /&gt;' showproc.vbs&lt;br /&gt;' Author: M. Fauzilkamil Zainuddin http://coderstalk.blogspot.com&lt;br /&gt;' October 2009&lt;br /&gt;'==========================================================='&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000A0"&gt;Option Explicit&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000A0"&gt;Dim&lt;/font&gt; oProc, oWMIServ, colProc&lt;br /&gt;&lt;font color="#0000A0"&gt;Dim&lt;/font&gt; strPC, strList&lt;br /&gt;&lt;font color="#0000A0"&gt;Dim&lt;/font&gt; StrSpace&lt;br /&gt;&lt;br /&gt;strPC = "."&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000A0"&gt;Set&lt;/font&gt; oWMIServ = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &amp; strPC &amp; "\root\cimv2")    &lt;br /&gt;&lt;br /&gt;&lt;font color="#0000A0"&gt;Set&lt;/font&gt; colProc = oWMIServ.ExecQuery("Select * from Win32_Process")&lt;br /&gt;&lt;br /&gt;strSpace = string(20," ")&lt;br /&gt;strList = "ProcName" &amp; strSpace &amp; vbTab &amp; "ProcID" &amp; vbCrLf &amp; string(45,"-")&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000A0"&gt;For&lt;/font&gt; &lt;font color="#0000A0"&gt;Each&lt;/font&gt; oProc &lt;font color="#0000A0"&gt;In&lt;/font&gt; colProc&lt;br /&gt;    strSpace = string(28 - len(oProc.Name)," ")&lt;br /&gt;    strList = strList &amp; vbCrLf &amp; oProc.Name &amp; strSpace &amp; vbTab &amp; oProc.ProcessId&lt;br /&gt;&lt;font color="#0000A0"&gt;Next&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;WScript.Echo strList&lt;br /&gt;WScript.Quit&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;And then, I can see the suspicious process. They can't hide from me anymore. I can even kill the process by simply adding if statement which check for the suspicious process Name or ProcessID in specific and kill it. Here's a snippet to terminate specific ProcessID:&lt;br /&gt;&lt;br /&gt;&lt;font color=black&gt;&lt;pre dir="ltr" style="border: 1px inset rgb(0, 0, 0); margin: 0px; padding: 3px; overflow: auto; width: 98%; height: 150px; text-align: left; "&gt;&lt;font color="#008000"&gt;' just add this code below 'WScript.Echo strList'&lt;/font&gt;&lt;br /&gt;&lt;font color="#0000A0"&gt;For Each&lt;/font&gt; oProc &lt;font color="#0000A0"&gt;In&lt;/font&gt; colProc&lt;br /&gt;    &lt;font color="#008000"&gt;' the 3008 is the ProcessID that I want to kill.&lt;br /&gt;    ' your process id may be different&lt;/font&gt;&lt;br /&gt;    &lt;font color="#0000A0"&gt;If&lt;/font&gt; oProc.ProcessID = 3008 &lt;font color="#0000A0"&gt;Then&lt;/font&gt;&lt;br /&gt;        oProc.Terminate()&lt;br /&gt;    &lt;font color="#0000A0"&gt;End If&lt;/font&gt;&lt;br /&gt;&lt;font color="#0000A0"&gt;Next&lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;That's all for now. Happy coding!! &lt;img class='inline' src='http://coderstalk.googlepages.com/tongue.gif'/&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7176220728693401350?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/7-P88qIRO6E/list-windows-xp-running-process-and.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_QmenDvyMjlk/St_Qa6pvvMI/AAAAAAAAB3Q/Pg5wxk8XU6g/s72-c/showproc.PNG" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/10/list-windows-xp-running-process-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-6040599400540105539</guid><pubDate>Fri, 29 May 2009 01:54:00 +0000</pubDate><atom:updated>2009-05-29T09:59:47.125+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>Ubuntu-my Jaunty Release Party &amp; Official LoCo Launching</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QmenDvyMjlk/Sh9BTtJhmbI/AAAAAAAABj4/z2zAkdJVAe0/s1600-h/ubuntu-my-JRP.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 283px; height: 400px;" src="http://1.bp.blogspot.com/_QmenDvyMjlk/Sh9BTtJhmbI/AAAAAAAABj4/z2zAkdJVAe0/s400/ubuntu-my-JRP.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5341059489877563826" /&gt;&lt;/a&gt;&lt;br /&gt;For more info, check out &lt;a href="http://baung.oscc.org.my/wiki/?title=ReleaseParty"&gt;Ubuntu Malaysia Jaunty Release Party&lt;/a&gt;. Enjoy!! &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-6040599400540105539?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/C-BGda84MMQ/ubuntu-my-jaunty-release-party-official.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_QmenDvyMjlk/Sh9BTtJhmbI/AAAAAAAABj4/z2zAkdJVAe0/s72-c/ubuntu-my-JRP.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/05/ubuntu-my-jaunty-release-party-official.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-32979595715104337</guid><pubDate>Mon, 26 Jan 2009 04:44:00 +0000</pubDate><atom:updated>2009-01-26T13:47:45.023+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">open source</category><category domain="http://www.blogger.com/atom/ns#">more</category><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">Operating System</category><category domain="http://www.blogger.com/atom/ns#">gadget</category><category domain="http://www.blogger.com/atom/ns#">Android</category><category domain="http://www.blogger.com/atom/ns#">mobile phone</category><title>Introducing Android : Open Source, Linux Based Mobile Phone Operating System</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QmenDvyMjlk/SX1H0Ur8jNI/AAAAAAAABao/yuA5Fxgl-hc/s1600-h/500px-Android-logo.svg.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 144x; height: 144px;" src="http://1.bp.blogspot.com/_QmenDvyMjlk/SX1H0Ur8jNI/AAAAAAAABao/yuA5Fxgl-hc/s144/500px-Android-logo.svg.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5295467701089373394" /&gt;&lt;/a&gt;Lately, I'm getting interested in &lt;span style="font-weight:bold;"&gt;Mobile Phone Application&lt;/span&gt;. And what make me more interested about it was, getting to know the &lt;span style="font-weight:bold;"&gt;Android&lt;/span&gt;, a new &lt;span style="font-weight:bold;"&gt;open source operating system and software platform for mobile phones&lt;/span&gt;. The Android is developed by Google, and later the Open Handset Alliance based on &lt;span style="font-weight:bold;"&gt;&lt;a href="http://coderstalk.blogspot.com/search/label/linux"&gt;Linux kernel&lt;/a&gt;&lt;/span&gt;. Google has made most of the Android platform available under the Apache free-software and open source license. &lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight:bold;"&gt;Open Handset Alliance (OHA)&lt;/span&gt; is a business alliance of 48 firms including Google, HTC, Intel, Motorola, Qualcomm, Samsung, LG, T-Mobile, NVIDIA, Sony Ericsson, ARM, AKM Semiconductor Inc, ASUSTek COmputer Inc, Atheros Communications, Borqs, Ericsson, Garmin International Inc, Wind River Systems, Huawei Technologies, Omron Software Co Ltd, Softbank Monile Corporation, Teleca AB, Toshiba Corporation and Vodafone that came together to develop open standards for mobile devices. The Android platform was announced on 5 November 2007 &lt;span class="fullpost"&gt; with the founding of the Open Handset Alliance. &lt;br /&gt;&lt;br /&gt;Now, mobile phone application developers are able to write &lt;span style="font-weight:bold;"&gt;managed code&lt;/span&gt; in the &lt;span style="font-weight:bold;"&gt;Java language&lt;/span&gt;, controlling the mobile device with Android via &lt;span style="font-weight:bold;"&gt;Google-developed Java libraries&lt;/span&gt;. If you are good in C or other &lt;span style="font-weight:bold;"&gt;programming&lt;/span&gt; languages, your applications written in C and other languages can be compiled to ARM native code and run. However, the other development path isn't officially supported by Google.  &lt;br /&gt;&lt;br /&gt;And, here is a video from &lt;span style="font-weight:bold;"&gt;Android&lt;/span&gt; developer to get you more excited with this Android &lt;img class='inline' src='http://coderstalk.googlepages.com/tongue.gif'/&gt; :&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/1FJHYqE0RDg&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/1FJHYqE0RDg&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Isn't it a WoooOOoW for you coders?... Let's get up, &lt;a href="http://www.android.com/"&gt;grab the SDK&lt;/a&gt; and develop great apps on Android. I would love to hear one of us entitled for those &lt;span style="font-weight:bold;"&gt;TEN MILLION U.S. DOLLARS&lt;/span&gt; for creating a great, useful, free and open source software on &lt;span style="font-weight:bold;"&gt;Android platform&lt;/span&gt;. &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;&lt;span style="font-style:italic;"&gt;p/s: For all my Chinese friends and readers, I would like to wish you all a very Happy and Prosperous Chinese New Year!! Cheers!!&lt;/span&gt;&lt;/quote&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-32979595715104337?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/Luq6sQG3J00/introducing-android-open-source-linux.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_QmenDvyMjlk/SX1H0Ur8jNI/AAAAAAAABao/yuA5Fxgl-hc/s72-c/500px-Android-logo.svg.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/01/introducing-android-open-source-linux.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-3698993315603026716</guid><pubDate>Thu, 22 Jan 2009 01:21:00 +0000</pubDate><atom:updated>2009-01-22T09:55:32.278+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Videos</category><category domain="http://www.blogger.com/atom/ns#">Hackers</category><category domain="http://www.blogger.com/atom/ns#">computer</category><category domain="http://www.blogger.com/atom/ns#">anime</category><title>Battle Programmer Shirase - Episode 2</title><description>For those who remember my post about the &lt;a href="http://coderstalk.blogspot.com/2008/05/battle-programmer-shirase-episode-1.html" target="_blank"&gt;Battle Programmer Shirase&lt;/a&gt;, here is the continuation of the episode. &lt;img class='inline' src='http://coderstalk.googlepages.com/sengih.gif'/&gt; For those who haven't watch the &lt;span style="font-weight:bold;"&gt;first episode&lt;/span&gt;, you better watch it first. But, if you wanna skip it, the first episode is the introduction of a &lt;span style="font-weight:bold;"&gt;brilliant programmer or hacker&lt;/span&gt; named &lt;span style="font-weight:bold;"&gt;Akira Shirase&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;In that episode, there was a &lt;span style="font-weight:bold;"&gt;hacking attempt&lt;/span&gt; on U.S. shipping company which reroutes a package to an &lt;span style="font-weight:bold;"&gt;Asian Hacker&lt;/span&gt;. While on the other side, BPS or &lt;span style="font-weight:bold;"&gt;Battle Programmer Shirase&lt;/span&gt; is recruited by Akizuki, an employee from Abin Electronics. BPS accepted Akira's recruitment after seeing the &lt;span style="font-weight:bold;"&gt;discontinued X68 series doujinshi SCSI card&lt;/span&gt; by Abin Electronics which was made at Iwasawa plant. Apart from that, there is another story of Misao-chan who somehow have an unknown relationship with Shirase. Now, let's watch this &lt;span style="font-weight:bold;"&gt;Episode 2 of Battle Programmer Shirase&lt;/span&gt;... &lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/7SOlmlxGC8w&amp;hl=en"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/7SOlmlxGC8w&amp;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Hmm.. hope you like it. I'll continue with the next episode later. Enjoy!!&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;div style="padding: 10px; background-color: rgb(255, 250, 218);"&gt;&lt;b&gt;You may also love to read:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href='http://coderstalk.blogspot.com/2008/05/battle-programmer-shirase-episode-1.html'&gt;Battle Programmer Shirase - Episode 1&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-3698993315603026716?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/i2X-H8nwuLs/battle-programmer-shirase-episode-2.html</link><author>noreply@blogger.com (ApOgEE)</author><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/01/battle-programmer-shirase-episode-2.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3928190665450830956.post-7191542143869332658</guid><pubDate>Mon, 19 Jan 2009 01:02:00 +0000</pubDate><atom:updated>2009-01-19T09:47:40.504+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>Where to find Ubuntu Resources?</title><description>I have lot's of queries from friends who recently migrates to Ubuntu on &lt;span style="font-weight: bold;"&gt;Where to find Ubuntu Resources?&lt;/span&gt; So, I'm listing some useful &lt;span style="font-weight: bold;"&gt;Ubuntu Resources&lt;/span&gt; here for newbies to start with.&lt;br /&gt;&lt;center&gt;&lt;a href="http://www.flickr.com/photos/jerungkun-gallery/3207613907/" title="Ubuntu in the Office by - ApOgEE -, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3391/3207613907_678bd8c6db_m.jpg" alt="Ubuntu in the Office" height="240" width="180" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ubuntuforums.org/"&gt;http://ubuntuforums.org&lt;/a&gt; - In this &lt;span style="font-weight: bold;"&gt;searchable web forum&lt;/span&gt; and moderated social network is a diverse, talented, and moderated community of Ubuntu users and support staff. People share their success and setbacks here with each other as well as offering assistance and guidance. Chances are good that if you’re having difficulty with something in &lt;span style="font-weight: bold;"&gt;Ubuntu&lt;/span&gt;, someone has already run into the same problem and found a solution.&lt;/li&gt;&lt;li&gt;&lt;a href="http://forums.ubuntu.com.my/"&gt;http://forums.ubuntu.com.my&lt;/a&gt; - This is another &lt;span style="font-weight: bold;"&gt;searchable web forum&lt;/span&gt; aiming to support local Malaysian Ubuntu Community. All the people here are &lt;span style="font-weight: bold;"&gt;Malaysian Ubuntu Users&lt;/span&gt; and Official Ubuntu LoCo Member. You can get support in Malay language here.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/www.ubuntu.com/support"&gt;www.ubuntu.com/support&lt;/a&gt; - This site offers &lt;span style="font-weight: bold;"&gt;paid support from Canonical Ltd.&lt;/span&gt;, the company behind Ubuntu. If you don’t want to spend time searching through the forums, or waiting for responses, Canonical Ltd. is one avenue for telephone, e-mail, and web support costing around $20 a month. There is also Ubuntu training available aimed at companies and corporate users.&lt;/li&gt;&lt;li&gt;&lt;a href="https://help.ubuntu.com/"&gt;https://help.ubuntu.com&lt;/a&gt; - This site contains the official, up-to-date, online documentation for each Ubuntu release. As newer Ubuntu releases come out, you can come here to find out what’s new.&lt;/li&gt;&lt;li&gt;&lt;a href="http://screencasts.ubuntu.com/"&gt;http://screencasts.ubuntu.com&lt;/a&gt; - View &lt;span style="font-weight: bold;"&gt;recorded desktop sessions&lt;/span&gt; on how to do different things with Ubuntu, from setting up a printer, to setting up Samba file sharing, to installing updates to keep your Ubuntu system in top shape. &lt;span style="font-weight: bold;"&gt;Ubuntu&lt;/span&gt; users are encouraged to join the Ubuntu Screencasts Launchpad Team (https://launchpad.net/~ubuntu-screencasts) to contribute.&lt;/li&gt;&lt;li&gt;&lt;a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users"&gt;https://lists.ubuntu.com/mailman/listinfo/ubuntu-users&lt;/a&gt; - Join the &lt;span style="font-weight: bold;"&gt;Ubuntu-users mailing list&lt;/span&gt; and interact with Ubuntu users over e-mail to discuss and solve problems that come up with everything from implementing mysql databases to setting up a problematic network devices. An archive of past threads can be viewed at https://lists.ubuntu.com/archives/ubuntu-users.&lt;/li&gt;&lt;li&gt;&lt;a href="https://wiki.ubuntu.com/IRCResourcePage"&gt;https://wiki.ubuntu.com/IRCResourcePage&lt;/a&gt; - If you are interested in live &lt;span style="font-weight: bold;"&gt;IRC chat support&lt;/span&gt;, you can visit the Ubuntu IRC resource page to find guidelines, clients, and chat servers which are an available source of support, free at any time. It is advisable to visit the Ubuntu Code of Conduct page (www.ubuntulinux.org/community/conduct/) if you have not taken part in IRC chat before.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/www.linux-usb.org"&gt;www.linux-usb.org&lt;/a&gt; - This web site aims to maintain a working knowledge of &lt;span style="font-weight: bold;"&gt;USB devices&lt;/span&gt; known to be Linux-friendly. There is a search utility where you can plug in the name or model of a manufacturer and get an instant status report on the usability of that device with Linux.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/www.linux-foundation.org/en/OpenPrinting"&gt;www.linux-foundation.org/en/OpenPrinting&lt;/a&gt; - &lt;span style="font-weight: bold;"&gt;The CUPS (http://cups.org)&lt;/span&gt; printing system is the standard printing system used on most Linux systems these days. If your printer model is not listed when you attempt to add a new printer to your Ubuntu system, you may need to search this site for an updated PPD file to add to your CUPS system. Vendors who make Linux-friendly printers can also be found at www.linux-foundation.org/en/OpenPrinting/Database/SuggestedPrinters.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/www.sane-project.org"&gt;www.sane-project.org&lt;/a&gt; - &lt;span style="font-weight: bold;"&gt;Scanner Access Now Easy (SANE)&lt;/span&gt; is a site devoted to the topic of document scanning on Linux. If you are looking for a scanner or multifunction printer, check here to see how well the vendors stack up in terms of Linux support.&lt;/li&gt;&lt;li&gt;&lt;a href="http://tldp.org/"&gt;http://tldp.org&lt;/a&gt; - &lt;span style="font-weight: bold;"&gt;The Linux Documentation Project&lt;/span&gt; is a culmination of Guides, How-To articles, and FAQS covering everything from how to make coffee with Linux to setting up QoS and Traffic Control.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Actually, this is not the complete list... You can search for more via your favourite search engine. However, these sites are good for beginner to start with. &lt;img class="inline" src="http://coderstalk.googlepages.com/sengih.gif" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3928190665450830956-7191542143869332658?l=coderstalk.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/CodersTalk/~3/LV9loFnq9UI/where-to-find-ubuntu-resources.html</link><author>noreply@blogger.com (ApOgEE)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm4.static.flickr.com/3391/3207613907_678bd8c6db_t.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://coderstalk.blogspot.com/2009/01/where-to-find-ubuntu-resources.html</feedburner:origLink></item></channel></rss>

