<?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>javier arturo rodríguez &#187; General</title>
	<atom:link href="http://javier.rodriguez.org.mx/index.php/category/general/feed" rel="self" type="application/rss+xml" />
	<link>http://javier.rodriguez.org.mx</link>
	<description>random musings</description>
	<lastBuildDate>Thu, 16 Apr 2009 14:00:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Link:  JSESSIONID considered harmful</title>
		<link>http://javier.rodriguez.org.mx/index.php/2009/04/16/link-jsessionid-considered-harmful</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2009/04/16/link-jsessionid-considered-harmful#comments</comments>
		<pubDate>Thu, 16 Apr 2009 14:00:13 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[link]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=227</guid>
		<description><![CDATA[Craig Condit makes a strong case against JSESSIONID in JSESSIONID considered harmful. And I just learned that it is disabled by default in Grails 1.1.
]]></description>
			<content:encoded><![CDATA[<p><a href="">Craig Condit</a> makes a strong case against JSESSIONID in <a href="http://randomcoder.com/articles/jsessionid-considered-harmful">JSESSIONID considered harmful</a>. And I just learned that it is <a href="http://jira.codehaus.org/browse/GRAILS-3364">disabled by default in Grails 1.1</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2009/04/16/link-jsessionid-considered-harmful/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>uHOWTO: Force script recompilation in embedded Perl Nagios</title>
		<link>http://javier.rodriguez.org.mx/index.php/2009/04/14/uhowto-force-script-recompilation-in-embedded-perl-nagios</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2009/04/14/uhowto-force-script-recompilation-in-embedded-perl-nagios#comments</comments>
		<pubDate>Wed, 15 Apr 2009 05:46:16 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=198</guid>
		<description><![CDATA[I just implemented elwell&#8217;s notify_via_jabber and it did not work at first. I got the following message in nagios.log:
[1237223883] **ePN failed to compile /usr/local/bin/notify_via_jabber: &#8220;Can&#8217;t locate Net/XMPP.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/sh
are/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at (eval 1) line 14,
BEGIN failed&#8211;compilatio&#8221; at /usr/lib/nagios2/p1.pl line 157.
I promptly apt-get installed libnet-xmpp-perl but [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://javier.rodriguez.org.mx/wp-content/uploads/2009/04/nagios.png" alt="nagios" title="nagios" width="150" height="68" class="alignleft size-full wp-image-224" align="left" />I just implemented <a href="http://scotgrid.blogspot.com/2007/05/jabber-dabba-do.html">elwell&#8217;s notify_via_jabber</a> and it did not work at first. I got the following message in nagios.log:</p>
<div class="codesnip-container" >[1237223883] **ePN failed to compile /usr/local/bin/notify_via_jabber: &#8220;Can&#8217;t locate Net/XMPP.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/sh<br />
are/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at (eval 1) line 14,<br />
BEGIN failed&#8211;compilatio&#8221; at /usr/lib/nagios2/p1.pl line 157.</div>
<p>I promptly apt-get installed libnet-xmpp-perl but the problem persisted &#8212; with the exact same error message. But Net::XMPP was now there!!<br />
Well it happens that Embedded Perl Nagios (ePN) caches the compiled script and does not try to recompile it until its timestamp changes. So I touched(1) the script and this time the dependency was resolved correctly and the script was compiled sucessfully.<br />
<script>
# touch /usr/local/bin/notify_via_jabber
</script><br />
This is probably documented somewhere, but I could not find any reference to this kind of problem with Nagios cached scripts so I tought I would share this simple recipe.</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2009/04/14/uhowto-force-script-recompilation-in-embedded-perl-nagios/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A dubious cure for shyness</title>
		<link>http://javier.rodriguez.org.mx/index.php/2009/04/06/a-dubious-cure-for-shyness</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2009/04/06/a-dubious-cure-for-shyness#comments</comments>
		<pubDate>Mon, 06 Apr 2009 14:08:50 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=214</guid>
		<description><![CDATA[ As it turns out, there is a &#8220;cure&#8221; for shyness. Seth Stevenson&#8217;s story &#8220;Extroverted Like Me&#8221; is a journey into the world of coolness through chemical aids but it quickly turns into a cautionary tale for those willing to overcome their social awkwardness through the use of mood-altering drugs.
Chocolate still seems safe.
]]></description>
			<content:encoded><![CDATA[<p><img src="http://javier.rodriguez.org.mx/wp-content/uploads/2009/04/paxil-150x150.jpg" alt="paxil" title="paxil" width="150" height="150" class="alignleft size-thumbnail wp-image-213" /> As it turns out, there is a &#8220;cure&#8221; for shyness. <a href="http://www.slate.com/id/2143243/?">Seth Stevenson&#8217;s story &#8220;Extroverted Like Me&#8221;</a> is a journey into the world of coolness through chemical aids but it quickly turns into a cautionary tale for those willing to overcome their social awkwardness through the use of mood-altering drugs.<br />
<a href="http://www.dailymail.co.uk/sciencetech/article-1166917/How-cup-hot-chocolate-boost-brain-power-stave-fatigue.html">Chocolate still seems safe</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2009/04/06/a-dubious-cure-for-shyness/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>U2 360º</title>
		<link>http://javier.rodriguez.org.mx/index.php/2009/04/01/u2-360deg</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2009/04/01/u2-360deg#comments</comments>
		<pubDate>Wed, 01 Apr 2009 08:13:28 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=209</guid>
		<description><![CDATA[In other news, I just got my tickets for U2s&#8217; first concert of the 360º tour in Barcelona!!! *Yay!*. Thanks, Jordi!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/codehead/3401360066/"><img src="http://farm4.static.flickr.com/3606/3401360066_1ff90fab1f_t.jpg" align="left"/></a>In other news, I just got my tickets for U2s&#8217; first concert of the <a href="http://360.u2.com/">360º tour</a> <a href="http://www.u2.com/tour/index/">in Barcelona</a>!!! *Yay!*. Thanks, <a href="http://elblogdelfernan.blogspot.com/">Jordi</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2009/04/01/u2-360deg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>uHOWTO: Recover an empty Podcast playlist in iTunes</title>
		<link>http://javier.rodriguez.org.mx/index.php/2009/03/30/uhowto-recover-an-empty-podcast-playlist-in-itunes</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2009/03/30/uhowto-recover-an-empty-podcast-playlist-in-itunes#comments</comments>
		<pubDate>Mon, 30 Mar 2009 08:20:44 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[iTunes]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=188</guid>
		<description><![CDATA[Our main iTunes box had flaky RAM -a heck of a problem to debug by itself- so it used to BSOD quite a lot during the past couple of months. One of the most common side effects was that the iTunes Podcast playlist would   appear empty every now and then. Luckily this is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://javier.rodriguez.org.mx/wp-content/uploads/2009/03/podcast-small.png" alt="Podcast" title="podcast-small" width="75" height="75" class="size-full wp-image-200" align="left"/>Our main iTunes box had flaky RAM -a heck of a problem to debug by itself- so it used to BSOD quite a lot during the past couple of months. One of the most common side effects was that the iTunes Podcast playlist would   appear empty every now and then. Luckily this is addressed in the <a href="http://support.apple.com/kb/HT2562">Apple Knowledge Base</a> and the solution amounts to using File|Add Folder to Library to add the {iTunes Music folder}/podcast folder to the library. Then you will have to re-activate your subscriptions by pressing the &#8220;Subscribe&#8221; button for all your favorite podcasts.</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2009/03/30/uhowto-recover-an-empty-podcast-playlist-in-itunes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>uHOWTO: Recover stuck modified keys from VMware Player or Workstation</title>
		<link>http://javier.rodriguez.org.mx/index.php/2009/01/15/uhowto-recover-stuck-modified-keys-from-vmware-player-or-workstation</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2009/01/15/uhowto-recover-stuck-modified-keys-from-vmware-player-or-workstation#comments</comments>
		<pubDate>Thu, 15 Jan 2009 14:12:53 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[sh]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[x11]]></category>
		<category><![CDATA[xmodmap]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=193</guid>
		<description><![CDATA[If you use VMware Player or VMware workstation under Linux and you&#8217;re an alt-tab fan like me, you might end up with stuck modifier keys, so you can&#8217;t use keys like Ctrl, Alt or Shift outside of VMware. Xiao Feng has written a nice script to recover from this annoying condition without having to reboot, [...]]]></description>
			<content:encoded><![CDATA[<p>If you use VMware Player or VMware workstation under Linux and you&#8217;re an alt-tab fan like me, you might end up with stuck modifier keys, so you can&#8217;t use keys like Ctrl, Alt or Shift outside of VMware. Xiao Feng has written a <a href="http://bitubique.com/tutorials/recovering-from-stuck-modifier-keys">nice script</a> to recover from this annoying condition without having to reboot, and I tought I&#8217;d share it with everyone out there:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="co1">#!/bin/sh</span><br />
<span class="co1"># Xiao Feng&#8217;s &quot;Recovering from stuck modifier keys caused by VMware&quot;</span><br />
<span class="co1"># http://bitubique.com/tutorials/recovering-from-stuck-modifier-keys</span><br />
/usr/bin/xmodmap &#8211; &lt;&lt; fixme<br />
clear <span class="kw3">shift</span><br />
add <span class="kw3">shift</span> = Shift_L Shift_R<br />
clear lock<br />
add lock = Caps_Lock<br />
clear control<br />
add control = Control_L Control_R<br />
clear mod1<br />
add mod1 = Alt_L Alt_R<br />
clear mod2<br />
add mod2 = Num_Lock<br />
clear mod3<br />
clear mod4<br />
add mod4 = Super_L Super_R<br />
clear mod5<br />
add mod5 = Scroll_Lock<br />
fixme<br />
xset r on<br />
xset m <span class="nu0">3</span>.<span class="nu0">5</span> <span class="nu0">4</span><br />
xset b off<br />
xset s off</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2009/01/15/uhowto-recover-stuck-modified-keys-from-vmware-player-or-workstation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A brief note about Spamhaus Policy Block List</title>
		<link>http://javier.rodriguez.org.mx/index.php/2008/12/09/a-brief-note-about-spamhaus-policy-block-list</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2008/12/09/a-brief-note-about-spamhaus-policy-block-list#comments</comments>
		<pubDate>Wed, 10 Dec 2008 01:23:59 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=177</guid>
		<description><![CDATA[After getting in closer-than-usual acquaintance with my mail server logs I thought I&#8217;d share a brief note I found in the Spamhaus PBL FAQ:

The first thing to know is: THE PBL IS NOT A BLACKLIST.

Oh, and since you&#8217;re already there you may want to linger a bit in this warning:

WARNING! Some post-delivery filters use &#8220;full [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://javier.rodriguez.org.mx/wp-content/uploads/2008/12/blackhole-150x150.gif" alt="" title="blackhole" width="150" height="150" class="alignleft size-thumbnail wp-image-183" />After getting in closer-than-usual acquaintance with my mail server logs I thought I&#8217;d share a brief note I found in the <a href="http://www.spamhaus.org/faq/answers.lasso?section=Spamhaus%20PBL#183">Spamhaus PBL FAQ</a>:</p>
<blockquote><p>
The first thing to know is: <strong>THE PBL IS NOT A BLACKLIST</strong>.
</p></blockquote>
<p>Oh, and since you&#8217;re already there you may want to linger a bit in <a href="http://www.spamhaus.org/faq/answers.lasso?section=Spamhaus%20PBL#185">this warning</a>:</p>
<blockquote><p>
WARNING! Some post-delivery filters use &#8220;full Received line traversal&#8221; or &#8220;deep parsing&#8221;, where the filter reads all the IPs in the Received lines. Legitimate users, correctly sending good mail out through their ISP&#8217;s smarthost, will have PBL-listed IPs show up in the first (lowest) Received header where their ISP picks it up. Such mail should not be blocked! So, you should tell your filters to stop comparing IPs against PBL at the IP which hands off to your mail server! That last hand-off IP is the one which PBL is designed to check. <strong>If you cannot configure your filters that way, then do not use PBL to filter your mail.</strong> Instead, you may wish to use sbl-xbl.spamhaus.org, but even that may have unacceptable &#8220;false positive&#8221; filtering, for example when a an exploited end-user machine sends legitimate mail out through the ISP smarthost, or when the dynamic assignment changes the IP to an uninfected machine. <strong>Do not use PBL or XBL if you do not understand the issues of &#8220;deep parsing&#8221;.</strong>
</p></blockquote>
<p>(Emphasis mine)<br />
So if your top-of-the-line multi-thousand-dollar antispam appliance  starts blocking all my email just because there&#8217;s a dynamic IP address somewhere in the header  <em>and there&#8217;s no freaking way to turn it off</em> please go ask for a refund. And stop bouncing my messages.<br />
Oh and by the way the default <a href="http://spamassassin.apache.org/">SpamAssassin</a> configuration in Debian assigns a 0.905 score if the last hop is in PBL. </p>
<div class="codesnip-container" >
<div class="codesnip">score RCVD_IN_PBL <span class="nu0">0</span> <span class="nu0">0</span>.<span class="nu0">509</span> <span class="nu0">0</span> <span class="nu0">0</span>.<span class="nu0">905</span><br />
&#8230;<br />
header RCVD_IN_PBL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.perldoc.com/perl5.6/pod/func/eval.html"><span class="kw3">eval</span></a>:check_rbl<span class="br0">&#40;</span><span class="st0">&#8216;zen-lastexternal&#8217;</span>, <span class="st0">&#8216;zen.spamhaus.org.&#8217;</span>, <span class="st0">&#8216;127.0.0.1[01]&#8216;</span><span class="br0">&#41;</span></div>
</div>
<p>And yes, SpamAssassin does the right thing and checks only the *last* external address &#8212; I&#8217;ve seen the code:</p>
<div class="codesnip-container" >
<div class="codesnip"><a href="http://www.perldoc.com/perl5.6/pod/func/package.html"><span class="kw3">package</span></a> Mail::<span class="me2">SpamAssassin</span>::<span class="me2">PerMsgStatus</span>;<br />
&#8230;<br />
&nbsp; &nbsp; <span class="co1"># If name is foo-lastexternal, check only the Received header just before</span><br />
&nbsp; &nbsp; <span class="co1"># it enters our internal networks; we can trust it and it&#8217;s the one that</span><br />
&nbsp; &nbsp; <span class="co1"># passed mail between networks </span><br />
&nbsp;</div>
</div>
<p>So once again kudos to Open Source &#8212; and Common Sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2008/12/09/a-brief-note-about-spamhaus-policy-block-list/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>uHOWTO: Use your N95 8G as a bluetooth modem under Linux with Telcel</title>
		<link>http://javier.rodriguez.org.mx/index.php/2008/09/30/uhowto-use-your-n95-8g-as-a-bluetooth-modem-under-linux-with-telcel</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2008/09/30/uhowto-use-your-n95-8g-as-a-bluetooth-modem-under-linux-with-telcel#comments</comments>
		<pubDate>Tue, 30 Sep 2008 15:30:28 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nokia N95 8G]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[n95]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[ppp]]></category>
		<category><![CDATA[wvdial]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=164</guid>
		<description><![CDATA[
For completeness, here&#8217;s a followup to my post about using a Nokia N95 as a bluetooth modem under Linux. This is a working wvdial configuration for use with Telcel in Mexico.
Remember to enter your SIM&#8217;s PIN in pin-telcel, and refer to my previous post for complete instructions.
[Dialer pin-telcel]
Modem = /dev/rfcomm0
Baud = 460800
Init1 =AT+Cpin=XXXX
[Dialer telcel]
Phone = [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://javier.rodriguez.org.mx/wp-content/uploads/2008/09/tux-n95-8g-telcel-150x150.jpg" alt="" title="tux-n95-8g-telcel" width="150" height="150" class="alignleft size-thumbnail wp-image-165" /><br />
For completeness, here&#8217;s a followup to my post about <a href="http://javier.rodriguez.org.mx/index.php/2008/09/28/howto-use-your-nokia-n95-cellphone-as-a-bluetooth-modem-for-linux">using a Nokia N95 as a bluetooth modem under Linux</a>. This is a working wvdial configuration for use with Telcel in Mexico.<br />
Remember to enter your SIM&#8217;s PIN in pin-telcel, and refer to my previous post for complete instructions.</p>
<div class="codesnip-container" >[Dialer pin-telcel]<br />
Modem = /dev/rfcomm0<br />
Baud = 460800<br />
Init1 =AT+Cpin=XXXX</p>
<p>[Dialer telcel]<br />
Phone = *99***1#<br />
Username = telcel<br />
Password = telcel<br />
Stupid Mode = 1<br />
Dial Command = ATDT<br />
Check Def Route = on<br />
Dial Attempts = 3<br />
Modem = /dev/rfcomm0<br />
Baud = 460800<br />
Init2 = ATZ<br />
Init3 = ATQ0 V1 E0 S0=0 &#038;C1 &#038;D2 +FCLASS=0<br />
Init4 = AT+CGDCONT=1,&#8221;IP&#8221;,&#8221;internet.itelcel.com&#8221;<br />
ISDN = 0<br />
Modem Type = Analog Modem</p></div>
<p>To use it, enter</p>
<div class="codesnip-container" ># wvdial vodafone-pin<br />
# wvdial vodafone</div>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2008/09/30/uhowto-use-your-n95-8g-as-a-bluetooth-modem-under-linux-with-telcel/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HOWTO: Use your Nokia N95 Cellphone as a Bluetooth modem for Linux</title>
		<link>http://javier.rodriguez.org.mx/index.php/2008/09/28/howto-use-your-nokia-n95-cellphone-as-a-bluetooth-modem-for-linux</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2008/09/28/howto-use-your-nokia-n95-cellphone-as-a-bluetooth-modem-for-linux#comments</comments>
		<pubDate>Mon, 29 Sep 2008 02:17:45 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nokia N95 8G]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[modem]]></category>
		<category><![CDATA[n95]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[tethered]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=156</guid>
		<description><![CDATA[Did you know that you can use your data-enabled N95 to get a thethered Internet connection from Linux? The access mode and speed will depend on your actual coberture, and as usual YMMV, but I&#8217;ve been using this setup for a few months and it works fine.
$ sudo -s
# apt-get install bluetooth bluez-pin bluez-utils kdebluetooth [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://javier.rodriguez.org.mx/wp-content/uploads/2008/09/tux-n95-8g-150x150.jpg" alt="" title="tux-n95-8g" width="150" height="150" class="alignleft size-thumbnail wp-image-158" />Did you know that you can use your data-enabled N95 to get a thethered Internet connection from Linux? The access mode and speed will depend on your actual coberture, and as usual YMMV, but I&#8217;ve been using this setup for a few months and it works fine.</p>
<div class="codesnip-container" >$ sudo -s<br />
# apt-get install bluetooth bluez-pin bluez-utils kdebluetooth wvdial</div>
<p>Now in user mode use KBlueMon to find out the Bluetooth address of your device and write it down.<br />
Then go ahead and initiate an OBEX file transfer to make sure that you can actually link to your phone and to establish a trust relationship. In your phone add the Laptop to your trusted device list, so it won&#8217;t nag you whenever you establish a link.<br />
Now edit /etc/bluetooth/rfcomm.conf :</p>
<div class="codesnip-container" >rfcomm0 {<br />
        bind yes;<br />
        device 00:21:09:XX:XX:XX;<br />
        channel 2;<br />
}</div>
<p>Replace your own device address after &#8220;device&#8221;.<br />
Now edit /etc/wvdial to add these two entries:</p>
<div class="codesnip-container" >[Dialer pin-vodafone]<br />
Modem = /dev/rfcomm0<br />
Baud = 460800<br />
Init1 =AT+Cpin=XXXX</p>
<p>[Dialer vodafone]<br />
Phone = *99***1#<br />
Username = vodafone<br />
Password = vodafone<br />
Stupid Mode = 1<br />
Dial Command = ATDT<br />
Check Def Route = on<br />
Dial Attempts = 3<br />
Modem = /dev/rfcomm0<br />
Baud = 460800<br />
Init2 = ATZ<br />
Init3 = ATQ0 V1 E0 S0=0 &#038;C1 &#038;D2 +FCLASS=0<br />
Init4 = AT+CGDCONT=1,&#8221;IP&#8221;,&#8221;ac.vodafone.es&#8221;<br />
ISDN = 0<br />
Modem Type = Analog Modem</p></div>
<p>You can give them any name you want. I have defined several providers, to avoid confusions and to use the provider at hand. Replace the &#8220;XXXX&#8221; in Init1 with your SIM&#8217;s PIN.<br />
Now to use them restart the Bluetooth subsystem:</p>
<div class="codesnip-container" ># /etc/init.d/bluetooth restart</div>
<p>And use wvdial to dial out:</p>
<div class="codesnip-container" ># wvdial vodafone-pin<br />
# wvdial vodafone</div>
<p>You should get an Internet link, complete with an IP, a default route and a couple of DNS servers.  If it doesn&#8217;t, reboot your phone liberally.<br />
Please note that this might get expensive quite quickly unless you get a data plan from your provider. Go ahead and make their day.<br />
Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2008/09/28/howto-use-your-nokia-n95-cellphone-as-a-bluetooth-modem-for-linux/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Assign a consecutive number to each row in a mySQL table</title>
		<link>http://javier.rodriguez.org.mx/index.php/2008/08/31/assign-a-consecutive-number-to-each-row-in-a-mysql-table</link>
		<comments>http://javier.rodriguez.org.mx/index.php/2008/08/31/assign-a-consecutive-number-to-each-row-in-a-mysql-table#comments</comments>
		<pubDate>Mon, 01 Sep 2008 03:11:14 +0000</pubDate>
		<dc:creator>javier</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://javier.rodriguez.org.mx/?p=151</guid>
		<description><![CDATA[Say that you need to add a unique index to an existing catalog table, so you decide to add a new column with a consecutive number in it. You may make it an auto_increment column, but that would work only for new inserts. How would you populate the column for the exisiting rows?
If you&#8217;re using [...]]]></description>
			<content:encoded><![CDATA[<p>Say that you need to add a unique index to an existing catalog table, so you decide to add a new column with a consecutive number in it. You may make it an auto_increment column, but that would work only for new inserts. How would you populate the column for the exisiting rows?<br />
If you&#8217;re using mySQL you may try this little recipe:<br />
First let&#8217;s add the column that we&#8217;ll use later as primary key.</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">ALTER</span> <span class="kw1">TABLE</span> mytable <span class="kw1">ADD</span> <span class="kw1">COLUMN</span> id integer first;</div>
</div>
<p>Now we declare a counter and use it to populate each row.</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">SET</span> @i = <span class="nu0">0</span>;<br />
<span class="kw1">UPDATE</span> mytable <span class="kw1">SET</span> id=<span class="br0">&#40;</span>@i:=@i+<span class="nu0">1</span><span class="br0">&#41;</span>;</div>
</div>
<p>Finally, we transform the new column into the primary key.</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">ALTER</span> <span class="kw1">TABLE</span> mytable <span class="kw1">MODIFY</span> <span class="kw1">COLUMN</span> id integer <span class="kw1">AUTO_INCREMENT</span> <span class="kw1">PRIMARY</span> <span class="kw1">KEY</span>;</div>
</div>
<p>There you go. A new auto-increment primary key that has been correctly populated for all existing rows.</p>
]]></content:encoded>
			<wfw:commentRss>http://javier.rodriguez.org.mx/index.php/2008/08/31/assign-a-consecutive-number-to-each-row-in-a-mysql-table/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
