<?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>Piece of Unix Hints</title>
	<atom:link href="http://hints.jeb.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://hints.jeb.be</link>
	<description>hints.jeb.be</description>
	<lastBuildDate>Fri, 04 Dec 2009 20:35:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Trend / Prediction with RRDtool</title>
		<link>http://hints.jeb.be/2009/12/04/trend-prediction-with-rrdtool/</link>
		<comments>http://hints.jeb.be/2009/12/04/trend-prediction-with-rrdtool/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 20:33:12 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[RRDTool]]></category>
		<category><![CDATA[Trend]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=58</guid>
		<description><![CDATA[I&#8217;ve not used RRDtool for a while and put back my attention on it few weeks ago. I found out that lots of new cool stuff are avalaible, like LSLSLOPE, LSLINT. These function return the parameters of the Least Squares Line (y = ax +b) approximating a dataset (LSLSLOPE return a, LSLINT return b). This [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve not used <a href="http://oss.oetiker.ch/rrdtool/" onclick="pageTracker._trackPageview('/outgoing/oss.oetiker.ch/rrdtool/?referer=');">RRDtool</a> for a while and put back my attention on it few weeks ago. I found out that lots of new cool stuff are avalaible, like <a href="http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html" onclick="pageTracker._trackPageview('/outgoing/oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html?referer=');">LSLSLOPE, LSLINT</a>. These function return the parameters of the Least Squares Line (y = ax +b) approximating a dataset (LSLSLOPE return a, LSLINT return b).<br />
This is interesting because with the function approximating your data you can graph a prediction of future data. Of course a Least Squares Line function will work best to approximate a dataset that tend to grow or shrink (like filesystem usage, memory usage, &#8230;) but not for data like temperature. I would say that if your data can be expressed in a percentage, an Least Squares Line can be fine. For data not tending to grow or shrink rrdtool provide some other function like <a href="http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html" onclick="pageTracker._trackPageview('/outgoing/oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html?referer=');">TREND and PREDICT</a>.</p>
<p>I will show how to use LSLSLOPE and LSLINT taking memory usage of a device as an example. My exemple will produce a graph like the following :<br />
<img class="alignnone size-full wp-image-59" title="MemoryTrend" src="http://hints.jeb.be/wp-content/uploads/2009/11/MemoryTrend.png" alt="MemoryTrend" /></p>
<p>As you see, the graph show trend using two Least Squares Line function, one generated from the full dataset (dataset is starting 24 Oct 2009) and one generated only from last week data. Projection on time axis is done from 90% to 100% of memory usage and the date resulting of calculation for 90% and 100% of usage is displayed. I&#8217;ve seen lots of question asking how to do this but did not found any answer, so I hope that my example will provide an answer.</p>
<p>Here is the perl code I&#8217;m using to generate this graph. There is no Perl specific code, so it can be converted to a normal rrdtool command.</p>
<pre>#! /usr/bin/perl
use RRDs;

$rrd_file = 'MEMORY.rrd';

RRDs::graph "MEMORY_Trend.png",
'--start', "10/24/2009",
'--end', "12/31/2009 00:00am",
'--title', "Memory Usage",
'--interlace', '--width=620', '--height=200',
"--color","ARROW#009900",
'--vertical-label', "Memory used (%)",
'--lower-limit', '0',
'--upper-limit', '100',
'--border','0',
'--rigid',

"DEF:used1=$rrd_file:used:AVERAGE",
"DEF:used2=$rrd_file:used:AVERAGE:start=10/24/2009",
"DEF:used3=$rrd_file:used:AVERAGE:start=-1w",
"DEF:used4=$rrd_file:used:AVERAGE:start=-2w",
"DEF:used5=$rrd_file:used:AVERAGE:start=-4w",
"DEF:free1=$rrd_file:free:AVERAGE",
"DEF:free2=$rrd_file:free:AVERAGE:start=10/24/2009",
"DEF:free3=$rrd_file:free:AVERAGE:start=-1w",
"DEF:free4=$rrd_file:free:AVERAGE:start=-2w",
"DEF:free5=$rrd_file:free:AVERAGE:start=-4w",

"CDEF:pused1=used1,100,*,used1,free1,+,/",
"CDEF:pused2=used2,100,*,used2,free2,+,/",
"CDEF:pused3=used3,100,*,used3,free3,+,/",
"CDEF:pused4=used4,100,*,used4,free4,+,/",
"CDEF:pused5=used5,100,*,used5,free5,+,/",

"HRULE:100#FF000044",
"HRULE:99.5#FF000044",
"HRULE:99#FF000044",
"HRULE:98.5#FF000044",
"HRULE:98#FF000044",
"HRULE:97.5#FF000044",
"HRULE:97#FF000044",
"HRULE:96.5#FF000044",
"HRULE:96#FF000044",
"HRULE:95.5#FF000044",
"HRULE:95#FF000044",
"HRULE:94.5#FF000022",
"HRULE:94#FF000022",
"HRULE:93.5#FF000022",
"HRULE:93#FF000022",
"HRULE:92.5#FF000022",
"HRULE:92#FF000022",
"HRULE:91.5#FF000022",
"HRULE:91#FF000022",
"HRULE:90.5#FF000022",
"HRULE:90#FF000022",

"COMMENT:                         Now          Min             Avg             Max\\n",
"AREA:pused1#00880077:Memory Used",
'GPRINT:pused1:LAST:%12.0lf%s',
'GPRINT:pused1:MIN:%10.0lf%s',
'GPRINT:pused1:AVERAGE:%13.0lf%s',
'GPRINT:pused1:MAX:%13.0lf%s' . "\\n",
"COMMENT: \\n",

'VDEF:D2=pused2,LSLSLOPE',
'VDEF:H2=pused2,LSLINT',
'CDEF:avg2=pused2,POP,D2,COUNT,*,H2,+',
'CDEF:abc2=avg2,90,100,LIMIT',
'VDEF:minabc2=abc2,FIRST',
'VDEF:maxabc2=abc2,LAST',

'VDEF:D3=pused3,LSLSLOPE',
'VDEF:H3=pused3,LSLINT',
'CDEF:avg3=pused3,POP,D3,COUNT,*,H3,+',
'CDEF:abc3=avg3,90,100,LIMIT',
'VDEF:minabc3=abc3,FIRST',
'VDEF:maxabc3=abc3,LAST',

"AREA:abc2#FFBB0077",
"AREA:abc3#0077FF77",
"LINE2:abc2#FFBB00",
"LINE2:abc3#0077FF",

"LINE1:avg2#FFBB00:Trend since 24 Oct 2009                      :dashes=10",
"LINE1:avg3#0077FF:Trend since 1 week\\n:dashes=10",
"GPRINT:minabc2:  Reach  90% @ %c :strftime",
"GPRINT:minabc3:  Reach  90% @ %c \\n:strftime",
"GPRINT:maxabc2:  Reach 100% @ %c :strftime",
"GPRINT:maxabc3:  Reach 100% @ %c \\n:strftime",

;

my $ERR=RRDs::error;
die "ERROR : $ERR" if $ERR;</pre>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2009/12/04/trend-prediction-with-rrdtool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tiff to JPEG</title>
		<link>http://hints.jeb.be/2008/12/20/tiff-to-jpeg/</link>
		<comments>http://hints.jeb.be/2008/12/20/tiff-to-jpeg/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 16:08:02 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=44</guid>
		<description><![CDATA[for file in `ls *.tiff`; do file2=`basename $file .tiff`;/bla/bin/tifftopnm "$file" &#124; /bla/bin/pnmtojpeg > "$file2.jpg"; done]]></description>
			<content:encoded><![CDATA[<pre>for file in `ls *.tiff`; do file2=`basename $file .tiff`;/bla/bin/tifftopnm "$file" | /bla/bin/pnmtojpeg > "$file2.jpg"; done</pre>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/20/tiff-to-jpeg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Per virtual user sa-learn training</title>
		<link>http://hints.jeb.be/2008/12/17/per-virtual-user-sa-learn-training/</link>
		<comments>http://hints.jeb.be/2008/12/17/per-virtual-user-sa-learn-training/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:53:14 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[SpamAssassin]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=42</guid>
		<description><![CDATA[Context I use a LDA that use Virtual User, and store email in /some/path/mail/&#60;domaine.tld&#62;/&#60;user&#62;/, this is a quite standard way to do. I also use spamassassin but wanted to have a per user bayes database and configuration. It&#8217;s still simple with spamc/spamd by running spamd -c --virtual-config-dir=/some/path/to/spamassassin/%d/%l ... and invoking spamc from you MTA with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Context</strong></p>
<p>I use a LDA that use Virtual User, and store email in /some/path/mail/&lt;domaine.tld&gt;/&lt;user&gt;/, this is a quite standard way to do.<br />
I also use spamassassin but wanted to have a per user bayes database and configuration. It&#8217;s still simple with spamc/spamd by running <code>spamd -c --virtual-config-dir=/some/path/to/spamassassin/%d/%l ...</code> and invoking spamc from you MTA with <code>spamc -u ${recipient} -f -e /path/to/your/LDA</code> so that i have user preference in <code>/some/path/saconf/&lt;domaine.tld&gt;/&lt;user&gt;/</code>.<br />
Now I would like to provide 2 imap folder to users, LearnSpam and LearnHam so that they could train their bayes database.<br />
Here the problem start, especially if you are not using one of the latest spamassassin version.<br />
<strong></strong></p>
<p><strong>The bad way<br />
</strong><br />
What sa-learn command will you run to take care of LearnSpam and LearnHam folders ? sa-lean has an &#8211;username option, you may want to use that but this is not intended to be use in this case, it&#8217;s to be used when bayes database are stored in an SQL database instead of file (this is correctly documented in latest SA version). So don&#8217;t try <code>sa-learn --username=&lt;user&gt;@&lt;domaine.tld&gt; --spam /some/path/mail/&lt;domaine.tld&gt;/&lt;user&gt;/.INBOX.LearnSpam/cur/*</code> it will not work. Imagine how this can work ? it can&#8217;t, how sa-learn could convert &lt;user&gt;@&lt;domaine.tld&gt; to /some/path/saconf/&lt;domaine.tld&gt;/&lt;user&gt;/ ?</p>
<p><strong>The good way<br />
</strong><br />
So the right command to use is <code>sa-learn -p /some/path/saconf/&lt;domaine.tld&gt;/&lt;user&gt;/user_prefs --spam /some/path/mail/&lt;domaine.tld&gt;/&lt;user&gt;/.INBOX.LearnSpam/cur/*</code> Using the -D (debug) option could be very helpfull to check if it&#8217;s work correctly, you must see <code>dbg: bayes: tie-ing to DB file R/O /some/path/saconf/&lt;domaine.tld&gt;/&lt;user&gt;/bayes_toks</code></p>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/per-virtual-user-sa-learn-training/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Backup file of multiple user with rsync</title>
		<link>http://hints.jeb.be/2008/12/17/backup-file-of-multiple-user-with-rsync/</link>
		<comments>http://hints.jeb.be/2008/12/17/backup-file-of-multiple-user-with-rsync/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:52:07 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=40</guid>
		<description><![CDATA[root problem with rsync Imagine that you want to backup the /home directory of server &#8216;A&#8217; to server &#8216;B&#8217; using rsync. There is two way to do this : You can run rsync on the server &#8216;A&#8217;, but if you want to correctly backup (I mean, having correct uid/gid/.. on backuped files) files you should [...]]]></description>
			<content:encoded><![CDATA[<p><strong>root problem with rsync</strong></p>
<p>Imagine that you want to backup the /home directory of server &#8216;A&#8217; to server &#8216;B&#8217; using rsync.</p>
<p>There is two way to do this :</p>
<ul>
<li>You can run rsync on the server &#8216;A&#8217;, but if you want to correctly backup (I mean, having correct uid/gid/.. on backuped files) files you should connect to the server &#8216;B&#8217; as root. I&#8217;m sure you don&#8217;t want to do that.</li>
</ul>
<ul>
<li>You can run rsync on the server &#8216;B&#8217;, but you should connect to &#8216;A&#8217; with an user that can read all file in /home. This could be complicated depending of your gid managment.</li>
</ul>
<p><strong>When Tar start to be your best friend<br />
</strong><br />
So how can you do ? the solution would be to store (uid/gid/permission/..) information in a dedicated file, so that you can apply them if you need to restore data.<br />
How can you do that ? I&#8217;m sure you are too lazy to write a shell/perl/python/.. script to do that. You&#8217;re right ! Use tar.<br />
What ? What ? You want me to tar /home and rsync it ? Are you mad ? I don&#8217;t use rsync to transfer 20Go at each backup.</p>
<p><strong>When 1 option and 2 lines can save you<br />
</strong><br />
Tar as an incremental option. This mean that you can make a 1st tar file with /home then you can do a 2nd tar file with only modified file since previous tar. This option is -g.<br />
Here is a 2 lines shell script to do the job</p>
<pre>gtar -g /var/backup/home/home-backup.snar -cpvzf /var/backup/home/home-backup.`/bin/date +%s`.tgz /home/
rsync --delay-updates -avz -e ssh /var/backup/home backupuser@'B':/var/backup/</pre>
<p>&#8211;delay-updates is very important because if you don&#8217;t use it if &#8216;A&#8217; crash when rsync is copying the .snar file (used to store incrementation information) you will miss it on &#8216;B&#8217; and can&#8217;t retore tar file correctly.<br />
-g only exist in GNU Tar. You may have to install it if you&#8217;re running *BSD. First check if you have a gtar binnary</p>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/backup-file-of-multiple-user-with-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Misconfigured Perl install path</title>
		<link>http://hints.jeb.be/2008/12/17/misconfigured-perl-install-path/</link>
		<comments>http://hints.jeb.be/2008/12/17/misconfigured-perl-install-path/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:50:52 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[CPAN]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=38</guid>
		<description><![CDATA[I got a strange problem on a server. CPAN was installing module outside of perl @INC, this is quite a nightmare. I found what was wrong and it was quite easy to solve. Run this command: # perl -V:'install.*' Look at installprivlib and installarchlib. If they don&#8217;t match @INC you can change them at the [...]]]></description>
			<content:encoded><![CDATA[<p>I got a strange problem on a server. CPAN was installing module outside of perl @INC, this is quite a nightmare.<br />
I found what was wrong and it was quite easy to solve.<br />
Run this command:</p>
<blockquote><p><code># perl -V:'install.*'</code></p></blockquote>
<p>Look at installprivlib and installarchlib. If they don&#8217;t match @INC you can change them at the end of perl Config.pm (in tie %Config, &#8216;Config&#8217;, {..})</p>
<p>To find your Config.pm file type</p>
<blockquote><p><code># perl -MConfig -le 'print $INC{"Config.pm"};'</code></p></blockquote>
<p>If you only use CPAN to install module I guess you can just change PREFIX in the CPAN Config.pm (but I haven&#8217;t tested this)</p>
<p>N.B.: If you can&#8217;t find installprivlib and installarchlib in tie %Config just add them.</p>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/misconfigured-perl-install-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting human reading time info from RRD files</title>
		<link>http://hints.jeb.be/2008/12/17/getting-human-reading-time-info-from-rrd-files/</link>
		<comments>http://hints.jeb.be/2008/12/17/getting-human-reading-time-info-from-rrd-files/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:49:59 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[RRDTool]]></category>
		<category><![CDATA[Humain Reading]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=36</guid>
		<description><![CDATA[You have a .rrd file but you don&#8217;t remember how much time RRAs can store data ? all right, no problem. First save this Perl code into a .pl file. $step = $1 if (m/step = (\d+)/); $rows = $1 if (m/rra.*\.rows = (\d+)/); if (m/(.*)\.pdp_per_row = (\d+)/) { $pdp = $2; $time = $step*$rows*$pdp; [...]]]></description>
			<content:encoded><![CDATA[<p>You have a .rrd file but you don&#8217;t remember how much time RRAs can store data ? all right, no problem.</p>
<p>First save this Perl code into a .pl file.</p>
<blockquote><p><code>$step = $1 if (m/step = (\d+)/);<br />
$rows = $1 if (m/rra.*\.rows = (\d+)/);<br />
if (m/(.*)\.pdp_per_row = (\d+)/) {<br />
$pdp = $2; $time = $step*$rows*$pdp;<br />
if ($time &gt; 31536000) { $time = sprintf("%.2f year",$time/31536000) }<br />
elsif ($time &gt; 86400) { $time = sprintf("%.2f days",$time/86400) }<br />
elsif ($time &gt; 3600)  { $time = sprintf("%.2f hours",$time/3600) }<br />
print "$1: $step*$rows*$pdp = $time\n";<br />
}</code></p></blockquote>
<p>Assuming the filename of the script is rrd_info.pl, run this Shell command:</p>
<blockquote><p><code>rrdtool info file.rrd | perl -n rrd_info.pl</code></p></blockquote>
<p>Here is an output example:</p>
<pre>rra[0]: 300*864*1 = 3.00 days
rra[1]: 300*864*5 = 15.00 days
rra[2]: 300*702*25 = 60.94 days
rra[3]: 300*840*125 = 364.58 days
rra[4]: 300*840*625 = 4.99 year
rra[5]: 300*864*1 = 3.00 days
rra[6]: 300*864*5 = 15.00 days
rra[7]: 300*702*25 = 60.94 days
rra[8]: 300*840*125 = 364.58 days
rra[9]: 300*840*625 = 4.99 year
rra[10]: 300*864*1 = 3.00 days
rra[11]: 300*864*5 = 15.00 days
rra[12]: 300*702*25 = 60.94 days
rra[13]: 300*840*125 = 364.58 days
rra[14]: 300*840*625 = 4.99 year</pre>
<p>The formula is update step time * numbers of rows in the rra * pdp_per_row</p>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/getting-human-reading-time-info-from-rrd-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Booting NetBSD on Mac (iMac DV+)</title>
		<link>http://hints.jeb.be/2008/12/17/booting-netbsd-on-mac-imac-dv/</link>
		<comments>http://hints.jeb.be/2008/12/17/booting-netbsd-on-mac-imac-dv/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:48:40 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[NetBSD]]></category>
		<category><![CDATA[Boot]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=34</guid>
		<description><![CDATA[This is what to use to boot NetBSD MacPPC CD on an iMac DV+ (at least): boot cd:,ofwboot.xcf netbsd.macppc or boot cd:0,ofwboot.xcf netbsd.macppc You may not need to put netbsd.macppc depending of the CD To boot on HD try this: boot cd:,ofwboot.xcf hd:/nebtsd or boot cd:,ofwboot.xcf hd:13/nebtsd Where 13 is the number of the netbsd [...]]]></description>
			<content:encoded><![CDATA[<p>This is what to use to boot NetBSD MacPPC CD on an iMac DV+ (at least):</p>
<blockquote><p><code>boot cd:,ofwboot.xcf netbsd.macppc</code></p></blockquote>
<p>or</p>
<blockquote><p><code>boot cd:0,ofwboot.xcf netbsd.macppc</code></p></blockquote>
<p>You may not need to put netbsd.macppc depending of the CD</p>
<hr />
<p>To boot on HD try this:</p>
<blockquote><p><code>boot cd:,ofwboot.xcf hd:/nebtsd</code></p></blockquote>
<p>or</p>
<blockquote><p><code>boot cd:,ofwboot.xcf hd:13/nebtsd</code></p></blockquote>
<p>Where 13 is the number of the netbsd partition (usualy near 13)</p>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/booting-netbsd-on-mac-imac-dv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PPP Over SSH</title>
		<link>http://hints.jeb.be/2008/12/17/ppp-over-ssh/</link>
		<comments>http://hints.jeb.be/2008/12/17/ppp-over-ssh/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:47:40 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[PPP]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=32</guid>
		<description><![CDATA[You may want to establish a full IP connection to a remote host (or remote lan) but you may not have any VPN software on the remote host, or on your host. There is a solution using SSH and PPP with the command pppd pty 'ssh -x -t -e none user@server /usr/sbin/pppd passive noauth 9600' [...]]]></description>
			<content:encoded><![CDATA[<p>You may want to establish a full IP connection to a remote host (or remote lan) but you may not have any VPN software on the remote host, or on your host.<br />
There is a solution using SSH and PPP with the command</p>
<blockquote><p><code>pppd pty 'ssh -x -t -e none user@server /usr/sbin/pppd passive noauth 9600' noauth 10.0.0.1:10.0.0.2</code></p></blockquote>
<p>You have to use key authentication because the tty is redirected to pppd so you can&#8217;t be prompted for a password.<br />
With this command, you can reach server at IP 10.0.0.1.<br />
By playing with pppd and route tables you can extend the IP tunnel to the entire remote LAN.</p>
<p>This has been tested between Mac OS X and NetBSD but should work with any system.<br />
It works but it&#8217;s very slow.</p>
<p>On some system you may have TTY problem, if it&#8217;s your case take a look to <a  class="ext-link" href="http://www.ishiboo.com/~nirva/Projects/vpn/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.ishiboo.com/_nirva/Projects/vpn/?referer=');">http://shinythings.com/pty-redir/</a> or <a class="ext-link"  href="http://www.ishiboo.com/~nirva/Projects/vpn/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.ishiboo.com/_nirva/Projects/vpn/?referer=');">http://www.ishiboo.com/~nirva/Projects/vpn/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/ppp-over-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best hints for Mac OS X 10.3 (Panther)</title>
		<link>http://hints.jeb.be/2008/12/17/best-hints-for-mac-os-x-103-panther/</link>
		<comments>http://hints.jeb.be/2008/12/17/best-hints-for-mac-os-x-103-panther/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:46:51 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[10.3]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=30</guid>
		<description><![CDATA[These hints has been found on MacOSXHints.com Create a virtual PDF printer Integrate maporama.com maps in Address Book (instead of mapquest.com) Use fast user switching from the Terminal (Nice !) Replace the Exposé &#8216;Show Desktop&#8217; behavior (Show entire desktop and put all windows in a very small one) Terminal window focus based on mouse movement [...]]]></description>
			<content:encoded><![CDATA[<p>These hints has been found on <a class="link-ext" href="http://www.MacOSXHints.com" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.MacOSXHints.com?referer=');">MacOSXHints.com</a></p>
<p><a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031116190809396" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031116190809396&amp;referer=');"><span class="icon">Create a virtual PDF printer</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=2003110614140491" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=2003110614140491&amp;referer=');"><span class="icon">Integrate maporama.com maps in Address Book (instead of mapquest.com)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031102031045417" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031102031045417&amp;referer=');"><span class="icon">Use fast user switching from the Terminal (Nice !)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031028081746219" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031028081746219&amp;referer=');"><span class="icon">Replace the Exposé &#8216;Show Desktop&#8217; behavior (Show entire desktop and put all windows in a very small one)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031029203936659" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031029203936659&amp;referer=');"><span class="icon">Terminal window focus based on mouse movement (X11 style)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031027180428655" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031027180428655&amp;referer=');"><span class="icon">Apply Quartz filters to print jobs (Allow to put a filter (color, light, tone&#8230;) on things you print)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031027145026892" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031027145026892&amp;referer=');"><span class="icon">Colored output from &#8216;ls&#8217; (Allow to have color when you do ls)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031026201131160" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031026201131160&amp;referer=');"><span class="icon">Use folder actions to manage downloaded images (Simple script to handle new file)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031026012223557" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031026012223557&amp;referer=');"><span class="icon">Use a password analyzer to test if a password is secure and improve his security</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031024200346697" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031024200346697&amp;referer=');"><span class="icon">Play a movie on the desktop using Exposé (Very fun <img src='http://hints.jeb.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=2003102409433661" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=2003102409433661&amp;referer=');"><span class="icon">Create desktop printers after upgrade install (How to put a printer service on desktop (or elsewhere))</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20031010141631859" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20031010141631859&amp;referer=');"><span class="icon">Enable the floating Exposé blob (Put a small blue blob on the screen to enable exposé)</span></a><br />
<a class="ext-link" href="http://www.macosxhints.com/article.php?story=20050621051643993" onclick="pageTracker._trackPageview('/outgoing/www.macosxhints.com/article.php?story=20050621051643993&amp;referer=');"><span class="icon">Configure DNS lookups from the terminal</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/best-hints-for-mac-os-x-103-panther/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get HTTP arguments when using PHP as CGI</title>
		<link>http://hints.jeb.be/2008/12/17/get-http-arguments-when-using-php-as-cgi/</link>
		<comments>http://hints.jeb.be/2008/12/17/get-http-arguments-when-using-php-as-cgi/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:45:50 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=28</guid>
		<description><![CDATA[Normaly when you use PHP as CGI, $_GET and $_POST should work as usual. But in certain configuration, they may not be set. In this case this code is the base to get args foreach (split('&#38;',$QUERY_STRING) as $tmp) { $tmp2 = split('=',$tmp); $$tmp2[0]=$tmp2[1]; }]]></description>
			<content:encoded><![CDATA[<p>Normaly when you use PHP as CGI, $_GET and $_POST should work as usual.<br />
But in certain configuration, they may not be set. In this case this code is the base to get args</p>
<blockquote><p><code>foreach (split('&amp;',$QUERY_STRING) as $tmp) {<br />
$tmp2 = split('=',$tmp);<br />
$$tmp2[0]=$tmp2[1];<br />
}</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/get-http-arguments-when-using-php-as-cgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
