<?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>twistedgenes.com - Blogs by Rakesh Gupta &#187; Linux</title>
	<atom:link href="http://www.twistedgenes.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.twistedgenes.com</link>
	<description>Blogs on truth, technology, food, linux, leisure, experiences, adventure, romance, friends etc !</description>
	<lastBuildDate>Sat, 12 Jun 2010 14:24:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ISP related issues. Reliance Communications WiMax problems solved</title>
		<link>http://www.twistedgenes.com/2010/01/isp-related-issues-reliance-communications-wimax-problems-solved/</link>
		<comments>http://www.twistedgenes.com/2010/01/isp-related-issues-reliance-communications-wimax-problems-solved/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 10:51:17 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rocking]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[Bangalore]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.twistedgenes.com/?p=341</guid>
		<description><![CDATA[Recently a lot of issues have turned up with my ISP provider, Reliance Communications in this case. I happen to use multiple laptops and a router. They lock a system based on MAC address or a long duration dhcp lease file. There are various ways to get rid of this situation. A few which I [...]]]></description>
			<content:encoded><![CDATA[<p>Recently a lot of issues have turned up with my ISP provider, Reliance Communications in this case. I happen to use multiple laptops and a router. They lock a system based on MAC address or a long duration dhcp lease file. There are various ways to get rid of this situation. A few which I could figure out and seem to work are</p>
<p><span style="text-decoration: underline;">&#8211; Do neatly logout of their web application, before switching machines. As they keep the records, which would not let you login using a different machine till a session timeout which ranges from 0.5 to 6 hours.</span></p>
<p><span style="text-decoration: underline;">&#8211; Spoof Your MAC Address, if you are using multiple laptops/desktops</span></p>
<p>use<strong> ifconfig</strong> utility:</p>
<p><span style="color: #000000;">MAC address can be changed very easily using <em>ifconfig</em>. Run the following command as root user.</span></p>
<p>#<em><strong>ifconfig eth0 down hw ether address</strong></em></p>
<p><em><strong>eth0</strong></em> is the name of the interface/NIC which address is to be changed.</p>
<p><em><strong>down</strong></em> means the NIC is to be shutdown before changing address.</p>
<p><em><strong>hw ether </strong></em>means hardware address class is ether(which indicates ethernet).</p>
<p><em><strong>address</strong></em> is the address which will used as the new mac.</p>
<p>After the successful execution of the command. start the NIC again using the command:</p>
<p><em><strong># /sbin/ifconfig eth0 up</strong></em></p>
<p><span style="text-decoration: underline;">&#8211; Release your IP after successful log out</span></p>
<p><em><strong># dhclient -r -pf  &lt; path to the current dhclient pid file &gt; </strong></em></p>
<p>The path of current dhclient pid file can be found using</p>
<p><strong><em># ps -eaf  | grep dhclient </em></strong></p>
<p>Path is usually /var/run/dhclient-eth0.pid or /var/run/dhclient-wlan0.pid</p>
<p><em><strong><br />
</strong></em></p>
<p><strong><em><br />
</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2010/01/isp-related-issues-reliance-communications-wimax-problems-solved/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Video in ASCII using VLC, SSH and refine with ffmpeg</title>
		<link>http://www.twistedgenes.com/2009/11/video-in-ascii-using-vlc-ssh-and-refine-with-ffmpeg/</link>
		<comments>http://www.twistedgenes.com/2009/11/video-in-ascii-using-vlc-ssh-and-refine-with-ffmpeg/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 17:47:01 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Crazy]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[Ffmpeg]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[VLC]]></category>

		<guid isPermaLink="false">http://www.twistedgenes.com/?p=257</guid>
		<description><![CDATA[This is how a video looks in ASCII.



How did we achieve it ?
- Login to a remote machine using ssh
- play a video using cvlc ( command line vlc )
- record the video using istanbul session recorder ( if u are in linux )
- convert it to mp4 format using ffmpeg
ffmpeg -i file.ogg -sameq  file.mp4
- [...]]]></description>
			<content:encoded><![CDATA[<p>This is how a video looks in ASCII.</p>
<p><center><br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/h8gpDaWPF2Q&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/h8gpDaWPF2Q&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br />
</center></p>
<p>How did we achieve it ?</p>
<p>- Login to a remote machine using ssh</p>
<p>- play a video using cvlc ( command line vlc )</p>
<p>- record the video using istanbul session recorder ( if u are in linux )</p>
<p>- convert it to mp4 format using ffmpeg</p>
<p>ffmpeg -i file.ogg -sameq  file.mp4</p>
<p>- Overlay the sound using ffmpeg and .mp3 of the same video. As in the sound would have played on remote machine and hence istanbul session recorder would not capture it.</p>
<p>ffmpeg -i file.mp4 -map 0.0 -i file.mp3 -map 1.0 -acodec copy -vcodec copy -ab 128k -ar 44100 file.mp4</p>
<p>- Crop the video, if you want to remove stuffs of your desktop before upload</p>
<p>ffmpeg -i output.mp4 -croptop 50 -cropbottom 50 output1.mp4</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2009/11/video-in-ascii-using-vlc-ssh-and-refine-with-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A strikingly odd web application exposure</title>
		<link>http://www.twistedgenes.com/2008/12/a-strikingly-odd-web-application-exposure/</link>
		<comments>http://www.twistedgenes.com/2008/12/a-strikingly-odd-web-application-exposure/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 19:06:39 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Crazy]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Curl]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://www.twistedgenes.com/?p=124</guid>
		<description><![CDATA[Without having to expose your backend stuff to the internet, how do you service a WAP/WEB request. The blog below discusses a typical method of achieving the same. Assuming that whole web system is being developed in a intranet and not hosted outside. Let us call the internal unexposed server as A. We need a [...]]]></description>
			<content:encoded><![CDATA[<p>Without having to expose your backend stuff to the internet, how do you service a WAP/WEB request. The blog below discusses a typical method of achieving the same. Assuming that whole web system is being developed in a intranet and not hosted outside. Let us call the internal unexposed server as A. We need a server hosted on internet to fetch the WAP/WEB requests from the mobile or computer. This server is called as B. The request is being fired on the server B, the request is written to a flat file called request file. Server A runs a shell program viz fetchrequest.sh which reads the request file every second for any new requests coming  using the curl unix utility. Meanwhile, the server B sleeps off and waits for a response from server A. Server A will read the request and if its new (newness of a request is determined by saving the previous  request number in a global shell environment variable) server A processes it and shoots back the response to server B in the form of a file via FTP. Server B, in its sleeping state waits for the this FTP response file. Once recieved, it pushes back the response to the user. The whole wait process is scheduled for a fixed period of time, after which a dummy response is send like server is down, request failed, bla bla etc . Let us see how the same is achieved in fetchreques.sh running on server A.</p>
<p>File fetchrequest.sh</p>
<pre>
#!/bin/bash
while [ 10 -eq 10 ]

#Runs in a infinite loop checking request file at server B every second
do
if [ `env | grep -c lastCounter` = 1 ];then
newCounter=`curl -s http://serverB/requestFile.txt | tail -1 | cut -d: -f1`

#Reading request file at server B
param=`curl -s serverB/requestFile.txt | tail -1 | cut -d: -f2` #Extracting the request parameters
echo newCounter : $newCounter lastCounter : $lastCounter

#If there is a new request, sending a response back to the server B
if [ "$newCounter" != "$lastCounter" ]; then
echo "Need to send a response"
echo "Response URL : http://serverA/something.pl?action=something&amp;param1&amp;param2"

#Trimming of the response that needs to be send to serverB and storing it in a variable
output=`curl -s "http://serverA/something.pl?action=something&amp;param1&amp;param2" | grep 'cap\\|img' |
sed \ 's/&lt;src&gt;.*&lt;\/src&gt;//g;s/&lt;cap&gt;/\:/g;s/&lt;\/cap&gt;//g;s/&lt;img&gt;/\:/g;s/&lt;\/img&gt;//g'`
echo "Response received : $output"

#writing the response to a flat file to be FTPed to server B
`echo $output&gt;"rp_$newCounter.txt"`
`export filename==rp_$newCounter.txt`
`echo ls -l "rp_$newCounter.txt"`
typeset -i responseSize=`wc -c rp_$newCounter.txt | cut -d" " -f1`
echo "Response size $responseSize"

#If the process response is garbled, small or null, sending a dummy error in FTP file
if [ $responseSize = 1 ];then
`echo "We are working , try later" &gt; "rp_$newCounter.txt"`
fi

#making an FTP connection to serverB and launching the response file
`curl -s -T "rp_$newCounter.txt" -u username:password"ftp://serverB/rp_$newCounter.txt"`
echo "Uploaded the FTP file for $newCounter request"
`rm -f rp_$newCounter.txt`
echo "Deleting rp_$newCounter.txt after upload"

#Updating the request environment variable
lastCounter=$newCounter
export lastCounter
fi
else
lastCounter=`curl -s http://serverB/mobRequests.txt | tail -1 | cut -d: -f1`
export lastCounter
fi
done
</pre>
<p>The whole system works very well, and the requests are processed and response send to user. There are however limitations to this model.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/12/a-strikingly-odd-web-application-exposure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade Fedora without burning the DVD/CDs</title>
		<link>http://www.twistedgenes.com/2008/11/upgrade-fedora-without-burning-the-dvdcds/</link>
		<comments>http://www.twistedgenes.com/2008/11/upgrade-fedora-without-burning-the-dvdcds/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 17:27:27 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rocking]]></category>
		<category><![CDATA[Truth]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://www.twistedgenes.com/?p=130</guid>
		<description><![CDATA[An upgrade of Fedora Core version normally requires burning the new version&#8217;s image in a DVD or CDs.  An alternate approach to the same is upgrading by copying the same to a hard drive or a pen drive. The approach mentioned below worked very well from me for an upgrade of FC9 to FC10.
Download the [...]]]></description>
			<content:encoded><![CDATA[<p>An upgrade of <a href="http://fedoraproject.org" target="_blank">Fedora Core</a> version normally requires burning the new version&#8217;s image in a DVD or CDs.  An alternate approach to the same is upgrading by copying the same to a hard drive or a pen drive. The approach mentioned below worked very well from me for an upgrade of FC9 to FC10.</p>
<p>Download the new version&#8217;s (say FC 10)  iso(DVD) image and save it to a disk drive partition. I used a pen drive for the same. It works very well for filesystems viz. FAT32,ext2 and not NTFS. Copy the image file to any directory say for example /mnt/FedoraCoreDVD.iso( Assuming, that pen drive is mounted at /mnt) . Mount the iso image in a directory(any) to extract the isolinux folder.</p>
<p><span style="#ff0000;"><span style="#ff0000;">#mount -o loop /mnt/FedoraCoreDVD.iso /home/user/Fedora/</span></span></p>
<p>Copy the isolinux folder and paste it inside the boot folder.</p>
<p><span style="#ff0000;">#cp -r /home/user/Fedora/isolinux /boot</span></p>
<p>Now we need to make an entry in the <a href="http://www.gnu.org/software/grub" target="_blank">grub file</a> to boot the copied isolinux folder&#8217;s install.img</p>
<p><span style="#ff0000;"># cat /etc/grub.conf</span></p>
<p>______________________________</p>
<p><span style="#ff0000;">title Fedora Upgrade<br />
root (hd0,8) </span>&#8212;&#8212;&#8212;&#8211;&gt; should be your  partition containing the current linux installation (0-&gt;First Hard Drive,8-&gt; Partition number on this drive )<br />
<span style="#ff0000;">kernel /isolinux/vmlinuz<br />
initrd /isolinux/initrd.img</span><br />
______________________________</p>
<p>Copy the isolinux folder also to the pen drive(/dev/sdb, mounted at /mnt in this case) and reboot the system. Select the &#8221; Fedora Upgrade&#8221; option in grub and the normal installation/upgrade demon anaconda will start. It will ask for the option of disk partition and folder containing the iso image and iso linux folder, which is /dev/sdb1 in this case. Select the same and the upgradation works like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/11/upgrade-fedora-without-burning-the-dvdcds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Machine on Fedora</title>
		<link>http://www.twistedgenes.com/2008/10/virtual-machine-on-fedora/</link>
		<comments>http://www.twistedgenes.com/2008/10/virtual-machine-on-fedora/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 18:26:00 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://rak19.wordpress.com/2008/10/09/virtual-machine-on-fedora/</guid>
		<description><![CDATA[Fedora comes with a virtual machine manager( similar to vmware products) which enables you to create a virtual machine and run various other operating system. I tried installing Windows XP on a virtual machine created using virt-manager in my Fedora. Key steps to begin ..
- Make sure libvirtd demon is running- Allocate the space as [...]]]></description>
			<content:encoded><![CDATA[<p>Fedora comes with a virtual machine manager( similar to vmware products) which enables you to create a virtual machine and run various other operating system. I tried installing Windows XP on a virtual machine created using virt-manager in my Fedora. Key steps to begin ..</p>
<p>- Make sure libvirtd demon is running<br />- Allocate the space as per your needs viz hard disk, RAM etc<br />- This one is the key step, do not forget to add a cdrom (/dev/hdc) pointning to iso image of Windows XP Disc, as after the first boot, XP installation searches for the Windows XP disk and it cannot read the host&#8217;s CDROM.</p>
<p>Everything goes on smooth with all these parameters.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/10/virtual-machine-on-fedora/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SELinux, Apache and Postgres SQL Connectivity</title>
		<link>http://www.twistedgenes.com/2008/09/selinux-apache-and-postgres-sql-connectivity/</link>
		<comments>http://www.twistedgenes.com/2008/09/selinux-apache-and-postgres-sql-connectivity/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 23:31:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rocking]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rak19.wordpress.com/2008/09/25/selinux-apache-and-postgres-sql-connectivity/</guid>
		<description><![CDATA[Recently, I decided to migrate the work from Apache windows to the Apache running on my Vmware fedora machine. Everything was supposed to work like a charm. Unfortunately, it did not. The perl  in the cgi-bin directory was throwing internal server error 500. The apache error log indicated &#8216;permission denied to create a socket&#8217;, [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:justify;font-family:verdana;">Recently, I decided to migrate the work from Apache windows to the Apache running on my Vmware fedora machine. Everything was supposed to work like a charm. Unfortunately, it did not. The perl  in the cgi-bin directory was throwing internal server error 500. The apache error log indicated &#8216;permission denied to create a socket&#8217;, &#8216;premature end of the script headers&#8217;. The stuff was supposed to be retrieved from postgres sql database by the perl thingy. It appeared to me that database server is not allowing my IP address to establish a connection, as recomended by pgadmin as well. After a successful entry of my IP in the conf file of postgres database server, problem still persisted. I tried almost everything, changing the file owner to apache, suexec in apache and hell lots of other possibilities. Then in the trial process I noticed a small pop up in the corner of the window, SELinux denial. SELinux is an enhanced feature in Linux, that can put restrictions on your applications in apache making database connection, nmap, access to network filesystem and lots and lots more. After giving apache persmission to make database connections, the error was resolved and application ran smoothly.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/09/selinux-apache-and-postgres-sql-connectivity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQUID Proxy Server Authenticated Mode</title>
		<link>http://www.twistedgenes.com/2008/09/squid-proxy-server-authenticated-mode/</link>
		<comments>http://www.twistedgenes.com/2008/09/squid-proxy-server-authenticated-mode/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 00:45:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Crazy]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rocking]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://rak19.wordpress.com/2008/09/21/squid-proxy-server-authenticated-mode/</guid>
		<description><![CDATA[We run a squid proxy server at our two system network at home   in unauthenticated mode. I was just going through the squid logs at /var/logs/squid/access.log, and I saw few miscreant IPs eating up my network bandwith by using our proxy server. Then, I decided to tune up the authentication mode for squid proxy [...]]]></description>
			<content:encoded><![CDATA[<div align="justify"><span>We run a squid proxy server at our two system network at home <img src='http://www.twistedgenes.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  in unauthenticated mode. I was just going through the squid logs at /var/logs/squid/access.log, and I saw few miscreant IPs eating up my network bandwith by using our proxy server. Then, I decided to tune up the authentication mode for squid proxy server. Squid doesn&#8217;t have its authentication module and we need to us LDAP,PAM or NCSA. I came accross NCSA based authentication at http://www.cyberciti.biz/tips/linux-unix-squid-proxy-server-authentication.html. Given below. It worked very well in our case. </p>
<p><strong>Configure an NCSA-style username and password authenticatio</strong>n</p>
<p>I am going to assume that squid is installed and working fine.</p>
<p>Tip: Before going further, test basic Squid functionality. Make sure squid is functioning without requiring authorization <img src='http://www.twistedgenes.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />Step # 1: Create a username/password</p>
<p>First create a NCSA password file using htpasswd command. htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of squid users.<br /># htpasswd /etc/squid/passwd user1<br />Output:</p>
<p>New password:<br />Re-type new password:<br />Adding password for user user1</p>
<p>Make sure squid can read passwd file:<br /># chmod o+r /etc/squid/passwd<br />Step # 2: Locate nsca_auth authentication helper</p>
<p>Usually nsca_auth is located at /usr/lib/squid/ncsa_auth. You can find out location using rpm (Redhat,CentOS,Fedora) or dpkg (Debian and Ubuntu) command:<br /># dpkg -L squid | grep ncsa_auth<br />Output:</p>
<p>/usr/lib/squid/ncsa_auth</p>
<p>If you are using RHEL/CentOS/Fedora Core or RPM based distro try:<br /># rpm -ql squid | grep ncsa_auth<br />Output:</p>
<p>/usr/lib/squid/ncsa_auth</p>
<p>Step # 3: Configure nsca_auth for squid proxy authentication</p>
<p>Now open /etc/squid/squid.conf file<br /># vi /etc/squid/squid.conf<br />Append (or modify) following configration directive:<br />auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd<br />auth_param basic children 5<br />auth_param basic realm Squid proxy-caching web server<br />auth_param basic credentialsttl 2 hours<br />auth_param basic casesensitive off</p>
<p>Also find out your ACL section and append/modify<br />acl ncsa_users proxy_auth REQUIRED<br />http_access allow ncsa_users<br />Make sure that you do not have any other http_access statement.  <br />Save and close the file.</p>
<p>Where,</p>
<p>  * auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd : Specify squid password file and helper program location<br />  * auth_param basic children 5 : The number of authenticator processes to spawn.<br />  * auth_param basic realm Squid proxy-caching web server : Part of the text the user will see when prompted their username and password<br />  * auth_param basic credentialsttl 2 hours : Specifies how long squid assumes an externally validated username:password pair is valid for &#8211; in other words how often the helper program is called for that user with password prompt. It is set to 2 hours.<br />  * auth_param basic casesensitive off : Specifies if usernames are case sensitive. It can be on or off only<br />  * acl ncsa_users proxy_auth REQUIRED : The REQURIED term means that any authenticated user will match the ACL named ncsa_users<br />  * http_access allow ncsa_users : Allow proxy access only if user is successfully authenticated.</p>
<p>Restart squid:<br /># /etc/init.d/squid restart</span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/09/squid-proxy-server-authenticated-mode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Vaccum kills us, space kills javascript</title>
		<link>http://www.twistedgenes.com/2008/09/vaccum-kills-us-space-kills-javascript/</link>
		<comments>http://www.twistedgenes.com/2008/09/vaccum-kills-us-space-kills-javascript/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 09:40:00 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rocking]]></category>
		<category><![CDATA[Truth]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rak19.wordpress.com/2008/09/16/vaccum-kills-us-space-kills-javascript/</guid>
		<description><![CDATA[I was exporting certain attributes viz roadname, ids, ways etc which were of alphanumeric type by appending them with a &#8216;+&#8217; charachter from my server side perl program to the javascript program at the client. The firebug popped up, unterminated string literal, lets see whats that &#8230;. Googling did not turned out to be of [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:justify;"><span class="Apple-style-span" style="font-family:'trebuchet ms';">I was exporting certain attributes viz roadname, ids, ways etc which were of alphanumeric type by appending them with a &#8216;+&#8217; charachter from my server side perl program to the javascript program at the client. The firebug popped up, </span><span class="Apple-style-span" style="color:rgb(255,0,0);"><span class="Apple-style-span" style="font-family:'trebuchet ms';">unterminated string literal</span></span><span class="Apple-style-span" style="font-family:'trebuchet ms';">, lets see whats that &#8230;. Googling did not turned out to be of much help. I tried making the string short, taking into an array etc. Sometimes it worked, sometimes it did not. Amazed, I came to a stupid conclusion on the size of the arguments that need to be passed. Perhaps, that was not the cause.On of my appended field was having a space, and string thereafter was considered as a different argument by javascript. Due to mismatch in the number of arguments for that js function, it was breaking. Such a silly mistake !!! <img src='http://www.twistedgenes.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</span></div>
<div style="text-align:justify;"><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="font-family:'trebuchet ms';">Hence,</span></span><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="font-family:'trebuchet ms';"> </span></span><span class="Apple-style-span" style="white-space:pre;"><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="font-family:'trebuchet ms';">Vaccum kills us, space kills javascript or rather any function in any damn<br />language.</span></span><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="font-family:'trebuchet ms';"> </span></span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/09/vaccum-kills-us-space-kills-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error while loading shared libraries: libx264.so.56: cannot open shared object file: No such file or directory</title>
		<link>http://www.twistedgenes.com/2008/07/error-while-loading-shared-libraries-libx264so56-cannot-open-shared-object-file-no-such-file-or-directory/</link>
		<comments>http://www.twistedgenes.com/2008/07/error-while-loading-shared-libraries-libx264so56-cannot-open-shared-object-file-no-such-file-or-directory/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 11:06:00 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rak19.wordpress.com/2008/07/05/error-while-loading-shared-libraries-libx264so56-cannot-open-shared-object-file-no-such-file-or-directory/</guid>
		<description><![CDATA[I recently ran an upgrade on my Fedora core box. All the library files got upgraded . Unfortunately, VLC player which used to run normal stopped working .
The error thrown was &#8216;vlc:error while loading shared libraries: libx264.so.56: cannot open shared object file: No such file or directory&#8217;.
What I discovered is that the file libx264.so.56 had [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:trebuchet ms;"><span style="font-family:verdana;font-size:130%;">I recently ran an upgrade on my Fedora core box. All the library files got upgraded . Unfortunately, VLC player which used to run normal stopped working .</p>
<p>The error thrown was </span><span style="font-style:italic;font-family:verdana;font-size:130%;">&#8216;vlc:error while loading shared libraries: libx264.so.56: cannot open shared object file: No such file or directory&#8217;</span><span style="font-family:verdana;font-size:130%;">.</p>
<p>What I discovered is that the file libx264.so.56 had updated to libx264.so.60. Hence, I created a soft link </span><span style="font-weight:bold;font-family:verdana;font-size:130%;">ln -s libx264.so.60 </span><span style="font-family:trebuchet ms;font-size:130%;"><span style="font-weight:bold;">libx264.so.56</span> . This solved the issue. And VLC runs file now.</span><br /></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/07/error-while-loading-shared-libraries-libx264so56-cannot-open-shared-object-file-no-such-file-or-directory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Draw a Circle in Java, the fundamental &#8220;pixels&#8221; way !</title>
		<link>http://www.twistedgenes.com/2008/06/draw-a-circle-in-java-the-fundamental-pixels-way/</link>
		<comments>http://www.twistedgenes.com/2008/06/draw-a-circle-in-java-the-fundamental-pixels-way/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 00:16:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rocking]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://rak19.wordpress.com/2008/06/21/draw-a-circle-in-java-the-fundamental-pixels-way/</guid>
		<description><![CDATA[The following code draws a circle of particular diameter by setting the PIXELS falling inside the circle to a different RGB value. It involves simple co-ordinate geometry fundas. There are some approximations being taken.


import java.awt.image.*;import javax.swing.*;import javax.swing.JComponent.*;
public class circles extends JFrame {public static void main(String args[])     {double d=Double.parseDouble(args[0]);   int [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bp2.blogger.com/_1pCudCDCfOY/SF1U-D7XTjI/AAAAAAAABBk/Lv_jtx_3Z8U/s1600-h/Screenshot-1.png"><img style="float:left;cursor:pointer;margin:0 10px 10px 0;" src="http://bp2.blogger.com/_1pCudCDCfOY/SF1U-D7XTjI/AAAAAAAABBk/Lv_jtx_3Z8U/s320/Screenshot-1.png" alt="" border="0" /></a><span style="font-family:courier new;">The following code draws a circle of particular diameter by setting the PIXELS falling inside the circle to a different RGB value. It involves simple co-ordinate geometry fundas. There are some approximations being taken.</span></p>
<p><span style="font-family:verdana;"><br />
</span></p>
<p><span style="color:rgb(0,0,0);font-family:trebuchet ms;"><span style="font-family:courier new;">import java.awt.image.*;</span><br /><span style="font-family:courier new;">import javax.swing.*;</span><br /><span style="font-family:courier new;">import javax.swing.JComponent.*;</span></p>
<p></span><span style="color:rgb(0,0,0);font-family:trebuchet ms;"><span style="font-family:courier new;">public class circles extends JFrame {</span><br /><span style="font-family:courier new;">public static void main(String args[])     {</span><br /><span style="font-family:courier new;">double d=Double.parseDouble(args[0]);   <br />int diameter= (int)d;</span><br /><span style="font-family:courier new;">circles ca= new circles();      </span><br /><span style="font-family:courier new;">ca.drawCircle(diameter);</span><br /><span style="font-family:courier new;">}</span><br /><span style="font-family:courier new;">public void drawCircle(int diameter) {</span><br /><span style="font-family:courier new;">    int x=0,y=0,radius;  </span><br /><span style="font-family:courier new;">    JFrame frame=new JFrame();</span><br /><span style="font-family:courier new;">JLabel lab;</span><br /><span style="font-family:courier new;">    BufferedImage bi=new BufferedImage (diameter,diameter,BufferedImage.TYPE_BYTE_GRAY );</span><br /><span style="font-family:courier new;">    WritableRaster raster=bi.getRaster();</span><br /><span style="font-family:courier new;">    double [] iPix=new double [diameter*diameter]; <br />if(diameter%2 == 1) {<br />        diameter-=1;<br />        }   <br /></span><span style="font-family:courier new;">    radius=diameter/2;</span><br /><span style="font-family:courier new;">    for(int i=0;i</span></span><span style="color:rgb(0,0,0);font-family:courier new;">(radius)){<br /></span><span style="color:rgb(0,0,0);font-family:courier new;">                y=y%(radius);<br /></span><span style="color:rgb(0,0,0);font-family:courier new;">            }<br /></span><span style="color:rgb(0,0,0);font-family:courier new;">else<br />{<br /></span><span style="color:rgb(0,0,0);font-family:courier new;">y-=radius;</span><br /><span style="color:rgb(0,0,0);font-family:courier new;">                y=-y;</span><br /><span style="color:rgb(0,0,0);font-family:courier new;">                     } </span><br /><span style="color:rgb(0,0,0);font-family:courier new;">            if((x*x+y*y)&lt;=((radius)*(radius)))    {                 iPix[i]=255;             }             else  {             iPix[i]=0;             }  }</span><span style="color:rgb(0,0,0);font-family:courier new;"><br />raster.setPixels(0,0,diameter,diameter,iPix);     lab=new JLabel(new ImageIcon(bi));                frame.add(lab);</span><br /><span style="color:rgb(0,0,0);font-family:courier new;"> frame.setVisible(true);        frame.setSize(600,600);<br /></span><span style="color:rgb(0,0,0);font-family:courier new;">}         </span><br /><span style="color:rgb(0,0,0);font-family:courier new;">}</span><br /><span style="font-family:courier new;"></p>
<p></span><span style="color:rgb(51,0,153);font-family:courier new;">compile the program as javac circles.java</p>
<p></span><span style="color:rgb(51,0,153);font-family:courier new;">run as java circles diameter_value</p>
<p></span><span style="color:rgb(51,0,153);font-family:courier new;">e.g. java circles 500</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twistedgenes.com/2008/06/draw-a-circle-in-java-the-fundamental-pixels-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4811008-2");
pageTracker._setDomainName(".twistedgenes.com");
pageTracker._trackPageview();
} catch(err) {}</script>