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

<channel>
	<title>Uncertain Binary Thoughts &#187; Linux</title>
	<atom:link href="http://ankurs.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://ankurs.com</link>
	<description>01110100110101010101011101100010</description>
	<lastBuildDate>Mon, 30 Aug 2010 16:51:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Getting started with pthread</title>
		<link>http://ankurs.com/2009/09/getting-started-with-pthread/</link>
		<comments>http://ankurs.com/2009/09/getting-started-with-pthread/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 19:38:34 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[begining]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[pthread]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=562</guid>
		<description><![CDATA[Recently i have started coding in C a lot and what i came across from a lot of people is that doing Threading in C is very hard, is it really like that? here is a simple Pthread program that should clear that up get it here in the above program i have just created]]></description>
			<content:encoded><![CDATA[<p>Recently i have started coding in C a lot and what i came across from a lot of people is that doing Threading in C is very hard, is it really like that? here is a simple Pthread program that should clear that up<br />
<script src="http://gist.github.com/179778.js"></script><br />
get it <a href="http://gist.github.com/179778">here</a></p>
<p>in the above program i have just created 2 threads and passed thr1 ( = 1 ) and thr2 ( = 2 ) values as parameters the function void * thread ( void * ptr ) is executes as a separate thread, we create two thread objects thread1 and thread2, and start threads using pthread_create function passing thread object, function pointer and parameters as arguments, here NULL specifies default attributes for the thread, we can change this by passing pthread_attr_t structure instead of NULL.<br />
we wait for the threads to finish using the pthread_join function<br />
One major problem that is faced by most of the people is of using a library which is not a thread safe library, so you need to be careful about the libraries you use in your program, if not sure about a particular library being thread safe, just assume it not to be thread safe</p>
<p>PS &#8211; No updates from a long time as i dont have a proper net connection &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/09/getting-started-with-pthread/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Manipal got its first Linux (fedora) server</title>
		<link>http://ankurs.com/2009/06/how-manipal-got-its-first-linux-fedora-server/</link>
		<comments>http://ankurs.com/2009/06/how-manipal-got-its-first-linux-fedora-server/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 17:38:16 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[college]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[manipal]]></category>
		<category><![CDATA[mit]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=542</guid>
		<description><![CDATA[It all started with a failing Student&#8217;s Teacher Feedback System, designed by few fourth year students of my college, in oct-nov 2008 the system was not able to scale and everything was reverted back to paper, it was then when i was contacted by a teacher from my Department ( Information and Communication Technology ),]]></description>
			<content:encoded><![CDATA[<p>It all started with a failing Student&#8217;s Teacher Feedback System, designed by few fourth year students of my college, in oct-nov 2008 the system was not able to scale and everything was reverted back to paper, it was then when i was contacted by a teacher from my Department ( Information and Communication Technology ), regarding if i can improve it.</p>
<p>i asked <a href="http://djsh.net">DJ</a> if he wants to join me and after few weeks of coding there it was Manipal university&#8217;s  first (working) Feedback System, when the point of hosting it came, i was surprised to find Manipal University has no Linux servers, i mean come on no Linux what are you people click sys admins, then we decided to setup our own server in the department, thus giving Manipal university its first Linux ( fedora 10 ) server.</p>
<p>currently it just hosts the Feedback System, but we are planning to use it as local ( internal ) fedora repository mirror, we need permission from the WiFi provider ION because almost all the students use only WiFi and not LAN, last time we tried we were denied by saying &#8221; You are  a threat to our network &#8220;, lets see how it goes this time. we will also require people to manage it but i think this can be handled very well by <a href="http://lugmanipal.org">LUG Manipal</a>, some pics<br />
<div id="attachment_543" class="wp-caption aligncenter" style="width: 310px"><a href="http://ankurs.com/wp-content/uploads/2009/06/09032009001.jpg"><img src="http://ankurs.com/wp-content/uploads/2009/06/09032009001-300x225.jpg" alt="Fedora 10 server in Manipal" title="Fedora 10 server in Manipal" width="300" height="225" class="size-medium wp-image-543" /></a><p class="wp-caption-text">Fedora 10 server in Manipal</p></div><br />
<div id="attachment_544" class="wp-caption aligncenter" style="width: 310px"><a href="http://ankurs.com/wp-content/uploads/2009/06/09032009002.jpg"><img src="http://ankurs.com/wp-content/uploads/2009/06/09032009002-300x225.jpg" alt="Fedora 10 server in Manipal" title="Fedora 10 server in Manipal" width="300" height="225" class="size-medium wp-image-544" /></a><p class="wp-caption-text">Fedora 10 server in Manipal</p></div></p>
<p>PS &#8211; i am looking for a way to convince them that setting up a mirror will be helpful for them as well as students can anyone suggest me how to go about it??</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/06/how-manipal-got-its-first-linux-fedora-server/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Get updates of completed torrents via SMS</title>
		<link>http://ankurs.com/2009/04/get-updates-of-completed-torrents-via-sms/</link>
		<comments>http://ankurs.com/2009/04/get-updates-of-completed-torrents-via-sms/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 12:13:16 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[dbus]]></category>
		<category><![CDATA[ktorrent]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[torrent]]></category>
		<category><![CDATA[twit]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=489</guid>
		<description><![CDATA[This Sunday when i was giving DBUS a look and thinking about all the cool things possible with it, one of my friend came asking how can he control his torrents from anywhere and i thought controlling is ok, do you want SMS updates??, i fired up qdbusviewer and there it was a simple way]]></description>
			<content:encoded><![CDATA[<p>This Sunday when i was giving <a href="http://www.freedesktop.org/wiki/Software/dbus">DBUS</a> a look and thinking about all the cool things possible with it, one of my friend came asking how can he control his torrents from anywhere and i thought controlling is ok, do you want SMS updates??, i fired up qdbusviewer and there it was a simple way to get sms notifications of finished torrents using well twitter and ktorrent, so here are the steps<br />
1) setup your cell phone to recieve SMS updates in twitter,<br />
2) get one more twitter account lets say ktorrent, follow ktorrent and turn device updates on,<br />
3) now save the script below say as torrenttwit.py<br />
4) now enter this ktorrent account username and password in the script below,<br />
5) start ktorrent if not already started, now run the script by typing &#8220;python torrenttwit.py&#8221;</p>
<pre>import dbus,base64,urllib2,urllib
from dbus.mainloop.glib import DBusGMainLoop

DBusGMainLoop(set_as_default=True)
username="username"
password="password"

def tweet(msg):
        request = urllib2.Request('http://twitter.com/statuses/update.json')
        request.add_header('Authorization', 'Basic %s' % base64.encodestring('%s:%s' % (username,password))[:-1])
        request.add_data(urllib.urlencode({'status': msg.encode('utf-8')}))
        opener = urllib2.build_opener()
        req= opener.open(request)

s = dbus.SessionBus()
kt = s.get_object("org.ktorrent.ktorrent","/core")

def update(k):
        torrent = s.get_object("org.ktorrent.ktorrent","/torrent/"+k)
        name = torrent.get_dbus_method("name","org.ktorrent.torrent")
        tweet("ktorrent: finished " +name())

kt.connect_to_signal("finished",update)

import gobject
loop = gobject.MainLoop()
loop.run()
</pre>
<p>you are done, now whenever a torrent finishes the script will twit and you will receive an SMS update<br />
enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/04/get-updates-of-completed-torrents-via-sms/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>ION proxy login problem</title>
		<link>http://ankurs.com/2009/02/ion-proxy-login-problem/</link>
		<comments>http://ankurs.com/2009/02/ion-proxy-login-problem/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 19:59:10 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[college]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ION]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[manipal]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=457</guid>
		<description><![CDATA[a few days ago ION (WiFi provider in Manipal University) started an ISA based proxy using NTLM authentication, which according to them was a client install!!! some people were facing problem with it, like their browsers were asking for authentication (login) again and again, and repositories were not working on Linux. So here is a]]></description>
			<content:encoded><![CDATA[<p>a few days ago ION (WiFi provider in Manipal University) started an ISA based proxy using <a href="http://en.wikipedia.org/wiki/NTLM">NTLM</a> authentication, which according to them was a client install!!! some people were facing problem with it, like their browsers were asking for authentication (login) again and again, and repositories were not working on Linux.<br />
So here is a simple screencast with solution for this problem it works great in Linux (esp. Fedora) i have also included configuring yum here, if someone wants to use apt-get (debian/ubuntu) they can do</p>
<p><code> export http_proxy=http://127.0.0.1:5865 </code></p>
<p>Ok coming to the main point, go and download <a href="http://sourceforge.net/projects/ntlmaps/">http://sourceforge.net/projects/ntlmaps/</a> and then watch the video <a href="http://ankurs.com/wp-content/uploads/2009/02/mov1.ogv">here</a><br />
People on windows can install python from <a href="http://python.org/ftp/python/2.6.1/python-2.6.1.msi">here</a> and then follow the steps<br />
<a href="http://ankurs.com/wp-content/uploads/2009/02/mov1.ogv">ION proxy problem solved</a><br />
Note:- If You face any problem please post back here&#8230;.<br />
PS:- every thing in Text form coming soon&#8230; (i am lazy)</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/02/ion-proxy-login-problem/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>HowTo MPD with Pulse audio</title>
		<link>http://ankurs.com/2009/02/howto-mpd-with-pulse-audio/</link>
		<comments>http://ankurs.com/2009/02/howto-mpd-with-pulse-audio/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:52:23 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[pulse]]></category>
		<category><![CDATA[sonata]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=453</guid>
		<description><![CDATA[A Little background, i just shifted to mpd from Amarok 2.0 somewhy i dont seem to like Amarok 2 but thats a different story, For those who dont know MPD s a flexible, powerful, server-side application for playing music. which runs as a daemon and has a lot of front ends for it, Sonata being]]></description>
			<content:encoded><![CDATA[<p>A Little background, i just shifted to <a href="http://en.wikipedia.org/wiki/Music_Player_Daemon">mpd</a> from Amarok 2.0 somewhy i dont seem to like Amarok 2 but thats a different story, For those who dont know MPD s a flexible, powerful, server-side application for playing music. which runs as a daemon and has a lot of front ends for it, <a href="http://sonata.berlios.de/documentation.html">Sonata</a> being a popular one.<br />
now coming to the point i use Fedora 10 and it has Pulseaudio by default, now the problem is i some time get  &#8220;NO Read Permission&#8221; in Sonata and then mpd  would stop working, in mpd.log file i will find &#8220;Error opening ALSA device &#8220;hw:0,0&#8243;: Device or resource busy&#8221; error, which means this is an pulseaudio permission issue, to solve it we need to change the mpd.conf (/etc/mpd.conf) to<br />
<code>audio_output {<br />
        type                    "pulse"<br />
        name                    "My Device"<br />
        device                  "hw:0,0"        # optional<br />
        format                  "44100:16:2"    # optional<br />
}<br />
</code><br />
then we need to add<br />
<code> load-module module-native-protocol-tcp auth-anonymous=1  </code><br />
to /etc/pulse/default.pa which gives everybody permission to use pulseaudio and thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2009/02/howto-mpd-with-pulse-audio/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ejecting non responding drives in Linux</title>
		<link>http://ankurs.com/2008/12/ejecting-non-responding-drives-in-linux/</link>
		<comments>http://ankurs.com/2008/12/ejecting-non-responding-drives-in-linux/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 18:41:13 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[drives]]></category>
		<category><![CDATA[ejecting]]></category>
		<category><![CDATA[fuser]]></category>
		<category><![CDATA[non]]></category>
		<category><![CDATA[responding]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=428</guid>
		<description><![CDATA[One of the biggest (not necessarily) problems that most (new) Linux users face is the problems of non responsive drives, espically when u insert a curropt CD / DVD which refuse to come out because something is trying to access it&#8230; or the extremely slow flash drives there are some software for it in windows]]></description>
			<content:encoded><![CDATA[<p>One of the biggest (not necessarily) problems that most (new) Linux users face is the problems of non responsive drives, espically when u insert a curropt CD / DVD which refuse to come out because something is trying to access it&#8230; or the extremely slow flash drives there are some software for it in windows like Unlocker ( dont remmember the correct name scine i dont use it ) but here we dont need any specific software we have had that feature from a long time and well its as simple as 2-3 lines on terminal and its name is &#8221; <strong>fuser</strong> &#8221; which is basicly used to displays the PIDs of processes using the specified files or file systems. and we can easily use it for our perpose, lets take an example suppose we need to remove the non responsing CD, for that you need to be root, do<br />
<code> su -</code><br />
or<br />
<code>sudo -i<code><br />
then type<br />
<code> fuser -k /dev/sr0 </code><br />
or<br />
<code> fuser -k /dev/cdrom0 </code><br />
which will kill all the process accessing that particular device, now you can easily eject the by doing<br />
<code> eject /dev/sr0</code><br />
or<br />
<code> eject /dev/cdrom0 </code></p>
<p>and you are done.</p>
<p>PS - " fuser " is useful in many more ways then just ejecting drives see " man fuser " for more info</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/12/ejecting-non-responding-drives-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Conky config</title>
		<link>http://ankurs.com/2008/11/my-conky-config/</link>
		<comments>http://ankurs.com/2008/11/my-conky-config/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 20:01:14 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[conky]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=430</guid>
		<description><![CDATA[Conky as its description says &#8221; It is a free, light-weight system monitor for X, that displays any information on your desktop. &#8221; which well describes all that is there, and there are many different ways to configure it, well to be presise there are 250+ objects so the configuration options are limitless above is]]></description>
			<content:encoded><![CDATA[<p>Conky as its description says &#8221; It is a free, light-weight system monitor for X, that displays any information on your desktop. &#8221; which well describes all that is there, and there are many different ways to configure it, well to be presise there are 250+ objects so the configuration options are limitless</p>
<div id="attachment_431" class="wp-caption aligncenter" style="width: 310px"><a href="http://ankurs.com/wp-content/uploads/2008/12/conky.png"><img class="size-medium wp-image-431" title="conky" src="http://ankurs.com/wp-content/uploads/2008/12/conky-300x187.png" alt="My Desktop With Conky running " width="300" height="187" /></a><p class="wp-caption-text">my Desktop</p></div>
<p>above is the image of my Desktop running conky and i have 2 file one &#8221; .conkyrc &#8221; and other &#8221; .conky/ammarok &#8221; in my home folder (i.e /home/ankur/) the files are<br />
&#8221; <a href="http://files.ankurs.com/conkyrc">.conkyrc</a> rename the file to <strong><em>.conkyrc</em></strong> &#8221;<br />
and &#8221; <strong><em><a href="http://files.ankurs.com/amarok">.conky/amarok</a></em></strong>&#8221; which is a amaroK info display script by eirc</p>
<p>you need to place amarok in ~/.conky/amarok make a folder .conky if it does not exist, also make ~/.conky/amarok executable, simply type &#8221; chmod +x ~/.conky/amarok &#8221; enjoy!!!</p>
<p>PS &#8211; If you dont have conky simply do yum install conky or sudo apt-get install conky </p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/11/my-conky-config/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Synaptics Touchpad in Fedora 9</title>
		<link>http://ankurs.com/2008/05/synaptics-touchpad-in-fedora-9/</link>
		<comments>http://ankurs.com/2008/05/synaptics-touchpad-in-fedora-9/#comments</comments>
		<pubDate>Fri, 30 May 2008 04:30:35 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[Fedora 9]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[Synaptics]]></category>
		<category><![CDATA[Touchpad]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=374</guid>
		<description><![CDATA[I have been using Fedora 9 from a long time and it really kick&#8217;s ass but i was facing the problem that my Touchpad was not working with it but the i found the solution here Here is how to do it The easiest was will be to install the package http://atrpms.net/dist/f9/synaptics/ or you can]]></description>
			<content:encoded><![CDATA[<p>I have been using Fedora 9 from a long time and it really kick&#8217;s ass but i was facing the problem that my Touchpad was not working with it but the i found the solution <a href="http://gentoo-wiki.com/HARDWARE_Synaptics_Touchpad">here</a><br />
Here is how to do it</p>
<p>The easiest was will be to install the package <a href="http://atrpms.net/dist/f9/synaptics/">http://atrpms.net/dist/f9/synaptics/</a><br />
or you can do it manually here</p>
<p>edited the /etc/X11/xorg.conf<br />
<code>gedit /etc/X11/xorg.conf</code></p>
<p>Added the following to the ServerLayout Section<br />
<code>InputDevice “TouchPad” “CorePointer”</code></p>
<p>add a new section:<br />
<code>Section “InputDevice”<br />
Driver      “synaptics”<br />
Identifier  “TouchPad”<br />
Option      “SendCoreEvents”<br />
Option      “Protocol” “auto-dev”<br />
Option      “SHMConfig” “on”<br />
Option “TapButton1″ “1″<br />
Option “TapButton2″ “2″<br />
EndSection</code></p>
<p>all done logout and login again and everything should be working fine</p>
<p>Update: found the rpm package <a href="https://bugzilla.redhat.com/show_bug.cgi?id=439386#c66">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/05/synaptics-touchpad-in-fedora-9/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Creating a Simple Chat Application with Python</title>
		<link>http://ankurs.com/2008/05/creating-a-simple-chat-application-with-python/</link>
		<comments>http://ankurs.com/2008/05/creating-a-simple-chat-application-with-python/#comments</comments>
		<pubDate>Thu, 01 May 2008 13:27:59 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Chat]]></category>
		<category><![CDATA[Creating]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[sockets]]></category>

		<guid isPermaLink="false">http://ankurs.com/?p=370</guid>
		<description><![CDATA[Creating application with Python is very simple, here is a simple chat application made by using the socket module, it has 2 parts First Server and Second client, you run the server first and then connect the client to it, here is the code Here is the Server Code #!/usr/bin/env python from socket import *]]></description>
			<content:encoded><![CDATA[<p>Creating application with Python is very simple, here is a simple chat application made by using the socket module, it has 2 parts First Server and Second client, you run the server first and then connect the client to it, here is the code</p>
<p>Here is the Server Code<br />
<code><br />
#!/usr/bin/env python</p>
<p>from socket import *<br />
from time import time, ctime</p>
<p>IP = ''<br />
PORT = 23456<br />
ADS = (IP, PORT)</p>
<p>tcpsoc = socket(AF_INET, SOCK_STREAM)<br />
tcpsoc.bind(ADS)<br />
tcpsoc.listen(5)</p>
<p>while 1:<br />
	print "Waiting for connection"<br />
	tcpcli, addr = tcpsoc.accept()<br />
	print "connected from:", addr<br />
	while 1:<br />
		data = tcpcli.recv(1024)<br />
		if not data : break<br />
		print data<br />
		data1 = raw_input(">>")<br />
		if data1 == "q;t": break<br />
		tcpcli.send(data1)<br />
	tcpcli.close()<br />
tcpsoc.close()<br />
</code></p>
<p>Here is the client code<br />
<code><br />
#!/usr/bin/env python</p>
<p>from socket import *</p>
<p>IP = ''<br />
PORT = 23456<br />
ADS = (IP, PORT)</p>
<p>tcpsoc = socket(AF_INET, SOCK_STREAM)<br />
tcpsoc.connect(ADS)</p>
<p>while 1:<br />
	data = raw_input("msg>>")<br />
	if not data : break<br />
	tcpsoc.send(data)<br />
	data = tcpsoc.recv(1024)<br />
	if not data: break<br />
	print data<br />
tcpsoc.close()<br />
</code><br />
the code above might not be properly intended so you can download the code from <a href="http://fb.ankurs.com/tcp_server.py">http://fb.ankurs.com/tcp_server.py</a> and <a href="http://fb.ankurs.com/tcp_client.py">http://fb.ankurs.com/tcp_client.py</a><br />
enjoy!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/05/creating-a-simple-chat-application-with-python/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Making Xml dump of MySQL</title>
		<link>http://ankurs.com/2008/03/making-xml-dump-of-mysql/</link>
		<comments>http://ankurs.com/2008/03/making-xml-dump-of-mysql/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 10:20:06 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>

		<guid isPermaLink="false">http://warofwords.wordpress.com/?p=400</guid>
		<description><![CDATA[Yesterday when i was trying/searching for a way to generate XML file from PHP so as to use it in Project 11, i came across a way to make a direct database/table dump from mysql and its damn easy all you have to do is type mysqldump -u username -p --xml databasename &#62; data.xml and]]></description>
			<content:encoded><![CDATA[<p>Yesterday when i was trying/searching for a way to generate XML file from PHP so as to use it in Project 11, i came across a way to make a direct database/table dump from mysql and its damn easy all you have to do is type<br />
<code>mysqldump -u username -p --xml databasename &gt; data.xml</code><br />
and it will dump whole database into the data.xml file enjoy!!!!<br />
PS:- Info about Project 11 coming up&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/03/making-xml-dump-of-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring WiFi with Ndiswrapper on Debian</title>
		<link>http://ankurs.com/2008/02/configuring-wifi-with-ndiswrapper-on-debian/</link>
		<comments>http://ankurs.com/2008/02/configuring-wifi-with-ndiswrapper-on-debian/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 18:23:31 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Configuring WiFi with Ndiswrapper on Debian]]></category>

		<guid isPermaLink="false">http://warofwords.wordpress.com/?p=388</guid>
		<description><![CDATA[Note :- If you want the way to make ndiswrapper work just skip the first paragraph its total crap Well as i have a Broadcom BCM4312 on my HP 6515b laptop, i face a lot of problems with WiFi and the only solution that i know of is using ndiswrapper with makes the windows driver]]></description>
			<content:encoded><![CDATA[<p>Note :- If you want the way to make ndiswrapper work just skip the first paragraph its total crap</p>
<p>Well as i have a Broadcom BCM4312 on my HP 6515b laptop, i face a lot of problems with WiFi and the only solution that i know of is using ndiswrapper with makes the windows driver work on Linux, anyway i installed Debian on my laptop around 1 month ago and then never looked back at it, ya i love Fedora, so yesterday when i rebooted my laptop after around a week i saw the Debian entry on my grub i booted into it and tried to connect to the WiFi network which reminded me that i have not configured ndiswrapper and as i have all 3 DVD&#8217;s of Debian with me i was sure it wont be a problem, but it didnt work and i was left wondering what now, and i started searching the DVD for any other package then i thought ok lets try to build the driver and there i was with a working net in just 5 min</p>
<p>Ok so lets start, you need module-assistant as you have to build the ndiswrapper from the source saperately, so type<br />
<code>apt-get install module-assistant</code><br />
then prepare the build environment<br />
<code>module-assistant prepare</code><br />
this will download the kernel-header and setup the symbolic links, now install the ndiswrapper-source package<br />
<code>apt-get install ndiswrapper-source</code><br />
if you have internet access only via WiFi the download the packages from <a href="http://packages.debian.org">http://packages.debian.org</a> and then install them, next build ndiswrapper<br />
<code>module-assistant build ndiswrapper</code><br />
now type<br />
<code>apt-get install ndiswrapper-utils-1.9</code><br />
now you are ready to install the drivers for that follow <a href="http://ankurs.com/2007/10/08/using-wifi-in-ubuntu-on-hp-6515b-broadcom/">this</a> enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/02/configuring-wifi-with-ndiswrapper-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling Wifi on Lenovo R60 in Linux</title>
		<link>http://ankurs.com/2008/02/enabling-wifi-on-lenovo-r60-in-linux/</link>
		<comments>http://ankurs.com/2008/02/enabling-wifi-on-lenovo-r60-in-linux/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 13:54:49 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[wifi lenovo r60 madwifi ath5k problem led]]></category>

		<guid isPermaLink="false">http://warofwords.wordpress.com/?p=387</guid>
		<description><![CDATA[So yesterday after hunting for the solution of the wifi problem in Lenovo R60 so quite sometime i finally decided to try DJays solution to build Madwifi and it worked like a charm. I was thinking that there will be a total Open Source solution of the problem but well i just hope that ath5k]]></description>
			<content:encoded><![CDATA[<p>So yesterday after hunting for the solution of the wifi problem in Lenovo R60 so quite sometime i finally decided to try <a href="http://djkaos.wordpress.com/">DJays</a> solution to build <a href="http://madwifi.org/">Madwifi</a> and it worked like a charm. I was thinking that there will be a total Open Source solution of the problem but well i just hope that ath5k will replace madwifi soon, anyway here is something about MadWifi</p>
<blockquote><p>MadWifi is one of the most advanced WLAN drivers available for Linux today. It is stable and has an established userbase. The driver itself is open source but depends on the proprietary Hardware Abstraction Layer (HAL) that is available in binary form only.</p></blockquote>
<p>Ok so lets start, first you need to download the source of Madwifi, go to <a href="http://madwifi.org/wiki/UserDocs/GettingMadwifi">http://madwifi.org/wiki/UserDocs/GettingMadwifi</a> and download tar.gz source package, extract it now open a terminal and login as root by typing su or sudo -i, then goto the madwifi directory and type<br />
<code>cd scripts<br />
./find-madwifi-modules.sh $(uname -r)<br />
cd ..</code><br />
now you are ready to compile<br />
<code>make</code><br />
now to install type<br />
<code>make install</code><br />
Now load the module<br />
<code>/sbin/modprobe ath_pci</code><br />
now you can easily connect to the net on your Lenovo R60 lappy<br />
To enable the wifi led just edit /etc/sysctl.conf, type<br />
<code>gedit /etc/sysctl.conf</code><br />
and add this at the end of the file and save<br />
<code>dev.wifi0.ledpin=1<br />
dev.wifi0.softled=1</code><br />
reboot and thats it enjoy!!!!!!!!!!!!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/02/enabling-wifi-on-lenovo-r60-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LUG Manipal has a WIKI now</title>
		<link>http://ankurs.com/2008/02/lug-manipal-has-a-wiki-now/</link>
		<comments>http://ankurs.com/2008/02/lug-manipal-has-a-wiki-now/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 19:14:37 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[college]]></category>

		<guid isPermaLink="false">http://warofwords.wordpress.com/?p=383</guid>
		<description><![CDATA[LUG is a collaborative project with people coming from all walks of life to work to work together for a common project or cause. Inspired by Wikipedia’s success as a collaborative project we thought of having a wiki at our site so that we can have a platform for working together. We can have vast]]></description>
			<content:encoded><![CDATA[<p>LUG is a collaborative project with people coming from all walks of life to work to work together for a common project or cause. Inspired by Wikipedia’s success as a collaborative project we thought of having a wiki at our site so that we can have a platform for working together. We can have vast details and ideas put up on the wiki for everyone to view later.</p>
<p>The Wiki’s URL is <a href="http://wiki.lugmanipal.org/">http://wiki.lugmanipal.org</a></p>
<p>come on people lets make it WWW == Wild Wild Wiki</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/02/lug-manipal-has-a-wiki-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora 8 Install Fest in MIT Manipal</title>
		<link>http://ankurs.com/2008/01/fedora-8-install-fest-in-mit-manipal/</link>
		<comments>http://ankurs.com/2008/01/fedora-8-install-fest-in-mit-manipal/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 18:10:38 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[college]]></category>

		<guid isPermaLink="false">http://warofwords.wordpress.com/?p=380</guid>
		<description><![CDATA[For the First time in History of Manipal a Linux ( Fedora 8 ) Install Fest took place on the Campus, it was organized by Linux user Group Manipal. It was Basically a 2 Day Fest, on 24th a Pre-Install Fest / Meet was there where participants were Informed about the requirements, advantages and Importance]]></description>
			<content:encoded><![CDATA[<p>For the First time in History of Manipal a Linux ( Fedora 8 ) Install Fest took place on the Campus, it was organized by Linux user Group Manipal. It was Basically a 2 Day Fest, on 24th a Pre-Install Fest / Meet was there where participants were Informed about the requirements, advantages and Importance of GNU/Linux and what all we will be doing in the second day i.e. 25th , there were all information given about various events held by companies inviting students to innovate.  The Day ended with the collection of DVD to be burned for 25th Main Fest and some 45+ DVD&#8217;s were collected with DVD&#8217;s still coming till start of Second day</p>
<div style="text-align:center;"><img src="http://farm3.static.flickr.com/2402/2213951561_2e9a4b1dd6.jpg?v=0" alt="LUG Manipal Fedora 8 Install Fest" height="375" width="500" /></div>
<p>Second day began with partitioning and distribution of DVD&#8217;s after which the main install fest began and all the steps were shown and explained, there was some DVD corruption / Improper burning but everything else was just fine, a script was prepared for upgrading Compiz and enabling 3D effects for the HP 6515b laptops, the script handled most of the task which were to be done in command line though all people were explained what it did but since most of the people were First Time users it really made the task of configuring the system very easy, rest laptops faced no problems so they directly booted in Graphical mode already being out of time the Install Fest was Finished with some problems still remaining which were solved</p>
<div style="text-align:center;"><img src="http://farm3.static.flickr.com/2309/2217093044_22d3a5047d.jpg?v=0" alt="LUG Manipal Fedora 8 Install Fest" /></div>
<div style="text-align:center;"><img src="http://farm3.static.flickr.com/2271/2216287695_a8d58a737f.jpg?v=0" alt="LUG Manipal Fedora 8 Install Fest" height="375" width="500" /></div>
<div style="text-align:center;"><img src="http://farm3.static.flickr.com/2410/2216287671_acb02332fb.jpg?v=0" alt="LUG Manipal Fedora 8 Install Fest" height="375" width="500" /></div>
<p>more photos <a href="http://flickr.com/photos/ankurkingofnet/sets/72157600264068727/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2008/01/fedora-8-install-fest-in-mit-manipal/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>3D effects on ubuntu 7.10 on ati 1250</title>
		<link>http://ankurs.com/2007/12/3d-effects-on-ubuntu-710-on-ati-1250/</link>
		<comments>http://ankurs.com/2007/12/3d-effects-on-ubuntu-710-on-ati-1250/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 20:16:14 +0000</pubDate>
		<dc:creator>Ankur Shrivastava</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[college]]></category>
		<category><![CDATA[1250]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[7.10]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[compiz]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[emerald]]></category>

		<guid isPermaLink="false">http://warofwords.wordpress.com/2007/12/29/3d-effects-on-ubuntu-710-on-ati-1250/</guid>
		<description><![CDATA[Well after going through a large number of guides like this i finally thought about giving guide at cchtml a try, well the hings mentioned are really great but not all steps are needed so here is a simplified version Here i assume that you have not done any of this step before and are]]></description>
			<content:encoded><![CDATA[<p>Well after going through a large number of guides like <a href="http://www.blog.arun-prabha.com/2007/12/11/yet-another-guide-for-compiz-ati-ubuntu-gutsy/" target="_blank">this</a> i finally thought about giving guide at <a href="http://wiki.cchtml.com/index.php/Ubuntu_Gutsy_Installation_Guide">cchtml</a> a try, well the hings mentioned are really great but not all steps are needed so here is a simplified version</p>
<p>Here i assume that you have not done any of this step before and are doing it for the first time but if that is not the case then this <b>might</b> not work for you.<br />
Ok so first step installation of drivers, there are two steps for this as mentioned in the cchtml wiki one automatic and other manual, for automatic you  need to enable the restricted repositories by going to System&gt;&gt;Administration&gt;&gt;Software Sources, and the typing<br />
<code>sudo apt-get update<br />
sudo apt-get install linux-restricted-modules-generic restricted-manager<br />
sudo apt-get install xorg-driver-fglrx</code><br />
which will install the drivers by downloading them from net, if you dont have the bandwidth to download that much you can go for the manual install where we will build those file, here i assumed that you have copy of the ati drivers <b>.run</b> file which if your Ubuntu is installed by me could be found at &#8220;/&#8221;, to build we need to install certain packages<br />
<code>sudo apt-get install module-assistant build-essential fakeroot dh-make debhelper debconf libstdc++5 linux-headers-generic dkms</code><br />
to build the packages type<br />
<code>sudo bash ati-driver-installer-8.443.1-x86.x86_64.run --buildpkg Ubuntu/gutsy</code><br />
in the directory where you have the ati-driver-installer-8.443.1-x86.x86_64.run file, this is the latest file at the time of writing but you might have a different file this will work with any driver after 8.38, as they have AIGLX support anyway now we need to install the packages made type<br />
<code>sudo dpkg -i xorg-driver-fglrx_8.443.1-1*.deb fglrx-kernel-source_8.443.1-1*.deb fglrx-amdcccle_8.443.1-1*.deb</code><br />
when you do that you might be asked<br />
<code>Configuration file `/etc/xdg/compiz/compiz-manager'<br />
==&gt; Deleted (by you or by a script) since installation.<br />
==&gt; Package distributor has shipped an updated version.<br />
What would you like to do about it ?  Your options are:<br />
Y or I  : install the package maintainer's version<br />
N or O  : keep your currently-installed version<br />
D     : show the differences between the versions<br />
Z     : background this process to examine the situation<br />
The default action is to keep your current version.<br />
*** compiz-manager (Y/I/N/O/D/Z) [default=N] ?</code><br />
just answer Y to the question and proceed, once this is done you now need to edit the xorg.conf file type (here &#8212; is [minus][minus] unlike a big [minus] as it appears to be )<br />
<code>aticonfig --initial<br />
sudo gedit /etc/X11/xorg.conf</code><br />
and replace<br />
<code>Section "Device"<br />
Identifier  "Generic Video Card"<br />
Driver      "vesa"<br />
BusID       "PCI:1:5:0"<br />
EndSection</code><br />
WITH<br />
<code>Section "Device"<br />
Identifier  "Generic Video Card"<br />
#Driver      "vesa"<br />
BusID       "PCI:1:5:0"<br />
Option		"VideoOverlay"		"on"<br />
Option		"OpenGLOverlay"		"off"<br />
EndSection</code> now just restart the X server but pressing Ctrl + ALT + Backspace, all done this will give you the Basic 3D effects but who is satisfied with  that we need more so we will go for installing Compiz settings manager, for this type<br />
<code> sudo apt-get install compizconfig-settings-manager gcompizthemer subversion<br />
svn ls https://svn.generation.no/emerald-themes</code><br />
now accept the certificate and fetch the themes by going to System&gt;&gt;Preferances&gt;&gt;Emerald Themes Manager,<br />
to enable 3D effects go to System&gt;&gt;Preferances&gt;&gt;Appearance then Visual Effects select Custom and edit your settings by Preferances<br />
now you are all set to blow  everyone up with your Linux box&#8217;s 3D effects enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://ankurs.com/2007/12/3d-effects-on-ubuntu-710-on-ati-1250/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
