<?xml version="1.0" encoding="iso-8859-15"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Foswiki Main/WillNorris (combined)</title>
<subtitle type="html">will's blog</subtitle>
<updated>2011-06-13T06:02:50Z</updated><link rel="self" type="application/atom+xml" href="http://wiki.biohack.net/bin/view/Main/WillNorris/WebAtomCombined" />
<link rel="alternate" type="text/html" hreflang="en" href="http://wiki.biohack.net/bin/view/Main/WillNorris/WebAtomCombined" /><logo>http://wiki.biohack.net/pub/System/BiohackDotNetTheme/biohack-logo.png</logo><generator uri="http://wiki.biohack.net/bin/view/System/BlogPlugin">
  Foswiki Foswiki-1.0.9-rc2, Sun, 10 Jan 2010, build 6008, BlogPlugin $Rev: 15560 (12 Dec 2008) $
</generator>
<id>tag:wiki.biohack.net,2012-02-22:Main/WillNorris.WebAtomCombined</id>
<rights>Copyright &#169; 2012 by contributing authors</rights>
<entry>
<title> bluetooth speakers </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry174" />
<id>tag:wiki.biohack.net,2011-06-13:Main.WillNorris.BlogEntry174</id>
<updated>2011-06-13T06:02:50Z</updated>
<published>2011-06-13T05:15:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> http://www.amazon.com/s/?ie=UTF8&amp;keywords=portable+bluetooth+speakers&amp;tag=googhydr-20&amp;index=aps&amp;hvadid=4288945747&amp;ref=pd_sl_49k6ax3d0q_b
</li> <li> http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&amp;IsNodeId=1&amp;Description=bluetooth speaker&amp;bop=And&amp;Order=RATING&amp;PageSize=100
</li> <li> http://www.tigerdirect.com/applications/category/category_slc.asp?CatId=5136&amp;name=Stereo Speakers
</li></ul> 
<p /> <ul>
<li> http://www.harmanaudio.com/search_browse/product_detail.asp?urlMaterialNumber=JBLONAIRWBLKAM&amp;utm_source=google&amp;utm_medium=ppc&amp;utm_campaign=onair&amp;gclid=CJv_reyVsqkCFcsZQgodvCDpLg
</li></ul> 
<p /> <ul>
<li> 
</li> <li> 
</li></ul> 
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> SCRUM tools </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry173" />
<id>tag:wiki.biohack.net,2011-05-20:Main.WillNorris.BlogEntry173</id>
<updated>2011-05-20T11:42:13Z</updated>
<published>2011-05-20T04:02:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> http://retrospectiva.org/ (ruby) no kaban
</li> <li> http://kompiro.org/jamcircle/en/
</li> <li> http://planningpoker.com/ (realtime team estimation)
</li> <li> http://www.atlassian.com/software/greenhopper/tour/scrum.jsp?gclid=CIyy_oKj9agCFcsZQgoduH-aTg (from the confluence people)
</li> <li> http://www.icescrum.org/ (groovy)
</li> <li> http://www.scrumpytool.com/ (meh?)
</li> <li> http://code.google.com/p/planigle/ (ror)
</li> <li> http://scrumdo.org/ (hosting available) 
</li> <li> http://agileexpress.sourceforge.net/ (java)
</li> <li> http://scrumdo.org/ (python/django/pinax)
</li> <li> 
</li> <li> 
</li> <li> 
</li></ul> 
<p /> <ul>
<li> http://www.simple-kanban.com/ (javascript, might be a useful component)
</li> <li> http://xpstudio.sourceforge.net/ eclipse plugins
</li></ul> 
<p /> <ul>
<li> http://scrumdashboard.codeplex.com/ (c#)
</li> <li> http://scrumtime.org/ (asp.net)
</li></ul> 
<p />
<p />
hosted-only services <ul>
<li> http://www.bananascrum.com/
</li> <li> http://pangoscrum.com/
</li> <li> http://www.agile42.com/cms/pages/agilo/
</li> <li> 
</li></ul> 
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> Hold Me Now </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry172" />
<id>tag:wiki.biohack.net,2011-04-04:Main.WillNorris.BlogEntry172</id>
<updated>2011-04-04T04:51:24Z</updated>
<published>2011-04-04T04:28:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  Hold_Me_Now.mid <p />
<div style="line-spacing:pre">
I have a picture,
pinned to my wall.
An image of you and of me and we're laughing and loving it all.
Look at our life now, tattered and torn.
We fuss and we fight and delight in the tears that we cry until dawn
<p />
Hold me now, warm my heart
stay with me, let loving start (let loving start)
<p />
You say I'm a dreamer, we're two of a kind
Both of us searching for some perfect world we know we'll never find
So perhaps I should leave here, yeah-ah go far away
But you know that there's nowhere that I'd rather be than with you here
today
<p />
[Chorus]
<p />
You ask if I love you, well what can I say?
You know that I do and if this is just one of those games that we play
So I'll sing you a new song, please don't cry anymore
and then I'll ask your forgiveness, though I don't know just what I'm
asking it for
<p />
[Chorus]
</div>
<p />
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> linux command line reference for common operations </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry171" />
<id>tag:wiki.biohack.net,2011-03-24:Main.WillNorris.BlogEntry171</id>
<updated>2011-03-24T18:43:07Z</updated>
<published>2011-03-24T18:32:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  (http://www.pixelbeat.org/cmdline.html) <p /><table class="pixelbeat"> 
<tbody> 
<p />
<tr id="misc" class="pbtitle"><td colspan="2"><b>Command</b></td><td><b>Description</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">apropos whatis</td><td>Show commands pertinent to string. See also threadsafe</td></tr> 
  <tr><td>&#8226;</td><td class="nw">man -t ascii | ps2pdf - &gt; ascii.pdf</td><td>make a pdf of a manual page</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">which command</td><td>Show full path name of command</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">time command</td><td>See how long a command takes</td></tr> 
  <tr><td>&#8226;</td><td class="nw">time cat</td><td>Start stopwatch. Ctrl-d to stop. See also sw</td></tr> 
<p />
<tr id="dirs" class="pbtitle"><td colspan="3"><b>dir navigation</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">cd -</td><td>Go to previous directory</td></tr> 
  <tr><td>&#8226;</td><td class="nw">cd</td><td>Go to $HOME directory</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">(cd dir &amp;&amp; command)</td><td>Go to dir, execute command and return to current dir</td></tr> 
  <tr><td>&#8226;</td><td class="nw">pushd <b>.</b></td><td>Put current dir on stack so you can <b>popd</b> back to it</td></tr> 
<p />
<tr id="file_search" class="pbtitle"><td colspan="3"><b>file searching</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">alias l='ls -l --color=auto'</td><td>quick dir listing</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ls -lrt</td><td>List files by date. See also newest and find_mm_yyyy</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ls /usr/bin | pr -T9 -W$COLUMNS</td><td>Print in 9 columns to width of terminal</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">find -name '*.[ch]' | xargs grep -E 'expr'</td><td>Search 'expr' in this dir and below. See also findrepo</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">find -type f -print0 | xargs -r0 grep -F 'example'</td><td>Search all regular files for 'example' in this dir and below</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">find -maxdepth 1 -type f | xargs grep -F 'example'</td><td>Search all regular files for 'example' in this dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; done</td><td>Process each item with multiple commands (in while loop)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">find -type f ! -perm -444</td><td>Find files not readable by all (useful for web site)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">find -type d ! -perm -111</td><td>Find dirs not accessible by all (useful for web site)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">locate -r 'file[^/]*\.txt'</td><td>Search cached index for names. This re is like glob <strong>file</strong>.txt</td></tr> 
  <tr><td>&#8226;</td><td class="nw">look reference</td><td>Quickly search (sorted) dictionary for prefix</td></tr> 
  <tr><td>&#8226;</td><td class="nw">grep --color reference /usr/share/dict/words</td><td>Highlight occurances of regular expression in dictionary</td></tr> 
<p />
<tr id="archives" class="pbtitle"><td colspan="3"><b>archives and compression</b></td></tr> 
  <tr><td>&nbsp;</td><td class="nw">gpg -c file</td><td>Encrypt file</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">gpg file.gpg</td><td>Decrypt file</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">tar -c dir/ | bzip2 &gt; dir.tar.bz2</td><td>Make compressed archive of dir/</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">bzip2 -dc dir.tar.bz2 | tar -x</td><td>Extract archive (use gzip instead of bzip2 for tar.gz files)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">tar -c dir/ | gzip | gpg -c | ssh user&#64;remote 'dd of=dir.tar.gz.gpg'</td><td>Make encrypted archive of dir/ on remote machine</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">find dir/ -name '*.txt' | tar -c --files-from=- | bzip2 &gt; dir_txt.tar.bz2</td><td>Make archive of subset of dir/ and below</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">find dir/ -name '*.txt' | xargs cp -a --target-directory=dir_txt/ --parents</td><td>Make copy of subset of dir/ and below</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">( tar -c /dir/to/copy ) | ( cd /where/to/ &amp;&amp; tar -x -p )</td><td>Copy (with permissions) copy/ dir to /where/to/ dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">( cd /dir/to/copy &amp;&amp; tar -c <b>.</b> ) | ( cd /where/to/ &amp;&amp; tar -x -p )</td><td>Copy (with permissions) contents of copy/ dir to /where/to/</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">( tar -c /dir/to/copy ) | ssh -C user&#64;remote 'cd /where/to/ &amp;&amp; tar -x -p' </td><td>Copy (with permissions) copy/ dir to remote:/where/to/ dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">dd bs=1M if=/dev/sda | gzip | ssh user&#64;remote 'dd of=sda.gz'</td><td>Backup harddisk to remote machine</td></tr> 
<p />
<tr id="rsync" class="pbtitle"><td colspan="3"><b>rsync</b> (Network efficient file copier: Use the --dry-run option for testing)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">rsync -P rsync://rsync.server.com/path/to/file file</td><td>Only get diffs. Do multiple times for troublesome downloads</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">rsync --bwlimit=1000 fromfile tofile</td><td>Locally copy with rate limit. It's like nice for I/O</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">rsync -az -e ssh --delete ~/public_html/ remote.com:'~/public_html'</td><td>Mirror web site (using compression and encryption)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">rsync -auz -e ssh remote:/dir/ <b>.</b> &amp;&amp; rsync -auz -e ssh <b>.</b> remote:/dir/</td><td>Synchronize current directory with remote one</td></tr> 
<p />
<tr id="ssh" class="pbtitle"><td colspan="3"><b>ssh</b> (Secure SHell)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ssh $USER@$HOST command</td><td>Run command on $HOST as $USER (default command=shell)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ssh -f -Y $USER@$HOSTNAME xeyes</td><td>Run GUI command on $HOSTNAME as $USER</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">scp -p -r $USER@$HOST: file dir/</td><td>Copy with permissions to $USER's home directory on $HOST</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">scp -c arcfour $USER@$LANHOST: bigfile</td><td>Use faster crypto for local LAN. This might saturate GigE</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ssh -g -L 8080:localhost:80 root@$HOST</td><td>Forward connections to $HOSTNAME:8080 out to $HOST:80</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ssh -R 1434:imap:143 root@$HOST</td><td>Forward connections from $HOST:1434 in to imap:143</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ssh-copy-id $USER@$HOST </td><td>Install public key for $USER@$HOST for password-less log in</td></tr> 
<p />
<tr id="wget" class="pbtitle"><td colspan="3"><b>wget</b> (multi purpose download tool)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">(cd dir/ &amp;&amp; wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html)</td><td>Store local browsable version of a page to the current dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">wget -c http://www.example.com/large.file</td><td>Continue downloading a partially downloaded file</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">wget -r -nd -np -l1 -A '*.jpg' http://www.example.com/dir/</td><td>Download a set of files to the current directory</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">wget ftp://remote/file[1-9].iso/</td><td>FTP supports globbing directly</td></tr> 
  <tr><td>&#8226;</td><td class="nw">wget -q -O- http://www.pixelbeat.org/timeline.html | grep 'a href' | head</td><td>Process output directly</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">echo 'wget url' | at 01:00</td><td>Download url at 1AM to current dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">wget --limit-rate=20k url</td><td>Do a low priority download (limit to 20KB/s in this case)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">wget -nv --spider --force-html -i bookmarks.html</td><td>Check links in a file</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">wget --mirror http://www.example.com/</td><td>Efficiently update a local copy of a site (handy from cron)</td></tr> 
<p />
<tr id="net" class="pbtitle"><td colspan="3"><b>networking</b> (Note ifconfig, route, mii-tool, nslookup commands are obsolete)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw"><acronym title="usually in /sbin/">ethtool</acronym> eth0</td><td>Show status of ethernet interface eth0</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ethtool --change eth0 autoneg off speed 100 duplex full</td><td>Manually set ethernet interface speed</td></tr> 
  <tr><td>&nbsp;</td><td class="nw"><acronym title="usually in /sbin/">iwconfig</acronym> eth1</td><td>Show status of wireless interface eth1</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">iwconfig eth1 rate 1Mb/s fixed</td><td>Manually set wireless interface speed</td></tr> 
  <tr><td>&#8226;</td><td class="nw"><acronym title="usually in /sbin/">iwlist</acronym> scan</td><td>List wireless networks in range</td></tr> 
  <tr><td>&#8226;</td><td class="nw"><acronym title="usually in /sbin/">ip</acronym> link show</td><td>List network interfaces</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ip link set dev eth0 name wan</td><td>Rename interface eth0 to wan</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ip link set dev eth0 up</td><td>Bring interface eth0 up (or down)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ip addr show</td><td>List addresses for interfaces</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ip addr add 1.2.3.4/24 brd + dev eth0</td><td>Add (or del) ip and mask (255.255.255.0)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ip route show</td><td>List routing table</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ip route add default via 1.2.3.254</td><td>Set default gateway to 1.2.3.254</td></tr> 
  <tr><td>&#8226;</td><td class="nw">host pixelbeat.org</td><td>Lookup DNS ip address for name or vice versa</td></tr> 
  <tr><td>&#8226;</td><td class="nw">hostname -i</td><td>Lookup local ip address (equivalent to host `hostname`)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">whois pixelbeat.org</td><td>Lookup whois info for hostname or ip address</td></tr> 
  <tr><td>&#8226;</td><td class="nw">netstat -tupl</td><td>List internet services on a system</td></tr> 
  <tr><td>&#8226;</td><td class="nw">netstat -tup</td><td>List active connections to/from system</td></tr> 
<p />
<tr id="windows" class="pbtitle"><td colspan="3"><b>windows networking</b> (Note samba is the package that provides all this windows specific networking support)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">smbtree</td><td>Find windows machines. See also findsmb</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">nmblookup -A 1.2.3.4</td><td>Find the windows (netbios) name associated with ip address</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">smbclient -L windows_box</td><td>List shares on windows machine or samba server</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share</td><td>Mount a windows share</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">echo 'message' | smbclient -M windows_box</td><td>Send popup to windows machine (off by default in XP sp2)</td></tr> 
<p />
<tr id="text" class="pbtitle"><td colspan="3"><b>text manipulation</b> (Note sed uses stdin and stdout. Newer versions support inplace editing with the -i option)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed 's/string1/string2/g'</td><td>Replace string1 with string2</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed 's/\(.*\)1/\12/g'</td><td>Modify anystring1 to anystring2</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed '/ *#/d; /^ *$/d'</td><td>Remove comments and blank lines</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed ':a; /\\$/N; s/\\\n//; ta'</td><td>Concatenate lines with trailing \</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed 's/[ \t]*$//'</td><td>Remove trailing spaces from lines</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed 's/\([`&quot;$\]\)/\\\1/g'</td><td>Escape shell metacharacters active within double quotes</td></tr> 
  <tr><td>&#8226;</td><td class="nw">seq 10 | sed "s/^/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/; s/ *\(.\{7,\}\)/\1/"</td><td>Right align numbers</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed -n '1000{p;<acronym title="quit ASAP">q</acronym>}'</td><td>Print 1000th line</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed -n '10,20p;<acronym title="quit ASAP">20q</acronym>'</td><td>Print lines 10 to 20</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed -n 's/.*&lt;title&gt;\(.*\)&lt;\/title&gt;.*/\1/ip;<acronym title="quit after match">T;q</acronym>'</td><td>Extract title from HTML web page</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sed -i 42d ~/.ssh/known_hosts</td><td>Delete a particular line</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sort -t. -k1,1n -k2,2n -k3,3n -k4,4n</td><td>Sort IPV4 ip addresses</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo 'Test' | tr '[:lower:]' '[:upper:]'</td><td>Case conversion</td></tr> 
  <tr><td>&#8226;</td><td class="nw">tr -dc '[:print:]' &lt; /dev/urandom</td><td>Filter non printable characters</td></tr> 
  <tr><td>&#8226;</td><td class="nw">tr -s '[:blank:]' '\t' &lt;/proc/diskstats | cut -f4</td><td>cut fields separated by blanks</td></tr> 
  <tr><td>&#8226;</td><td class="nw">history | wc -l</td><td>Count lines</td></tr> 
<p />
<tr id="sets" class="pbtitle"><td colspan="3"><b>set operations</b> (Note you can export LANG=C for speed. Also these assume no duplicate lines within a file)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sort file1 file2 | uniq</td><td><acronym title="Items in either file1 or file2">Union</acronym> of unsorted files</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sort file1 file2 | uniq -d</td><td><acronym title="Items both in file1 and file2">Intersection</acronym> of unsorted files</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sort file1 file1 file2 | uniq -u</td><td><acronym title="Items in file2 not in file1">Difference</acronym> of unsorted files</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sort file1 file2 | uniq -u</td><td><acronym title="Items in only one file">Symmetric Difference</acronym> of unsorted files</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">join <acronym title="process whole line (assuming no NUL characters present)">-t'\0'</acronym> -a1 -a2 file1 file2</td><td>Union of sorted files</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">join -t'\0' file1 file2</td><td>Intersection of sorted files</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">join -t'\0' -v2 file1 file2</td><td>Difference of sorted files</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">join -t'\0' -v1 -v2 file1 file2</td><td>Symmetric Difference of sorted files</td></tr> 
<p />
<tr id="math" class="pbtitle"><td colspan="3"><b>math</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo '(1 + sqrt(5))/2' | bc -l</td><td>Quick math (Calculate &#966;). See also bc</td></tr> 
  <tr><td>&#8226;</td><td class="nw">seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -l</td><td>Calculate <font face="times">&#960;</font> the unix way</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo 'pad=20; min=64; (100*10^6)/((pad+min)*8)' | bc</td><td>More complex (int) e.g. This shows max FastE packet rate</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo 'pad=20; min=64; print (100E6)/((pad+min)*8)' | python</td><td>Python handles scientific notation</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo 'pad=20; plot [64:1518] (100*10**6)/((pad+x)*8)' | gnuplot -persist</td><td>Plot FastE packet rate vs packet size</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo 'obase=16; ibase=10; 64206' | bc</td><td>Base conversion (decimal to hexadecimal)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo $((0x2dec))</td><td>Base conversion (hex to dec) ((shell arithmetic expansion))</td></tr> 
  <tr><td>&#8226;</td><td class="nw">units -t '100m/9.58s' 'miles/hour'</td><td>Unit conversion (metric to imperial)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">units -t '500GB' 'GiB'</td><td>Unit conversion (<acronym title="powers of 10">SI</acronym> to <acronym title="powers of 2">IEC</acronym> prefixes)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">units -t '1 googol'</td><td>Definition lookup</td></tr> 
  <tr><td>&#8226;</td><td class="nw">seq 100 | (tr '\n' +; echo 0) | bc</td><td>Add a column of numbers. See also add and funcpy</td></tr> 
<p />
<tr id="dates" class="pbtitle"><td colspan="3"><b>calendar</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">cal -3</td><td>Display a calendar</td></tr> 
  <tr><td>&#8226;</td><td class="nw">cal 9 1752</td><td>Display a calendar for a particular month year</td></tr> 
  <tr><td>&#8226;</td><td class="nw">date -d fri</td><td>What date is it this friday. See also day</td></tr> 
  <tr><td>&#8226;</td><td class="nw">[ $(date -d "tomorrow" +%d) = "01" ] || exit</td><td>exit a script unless it's the last day of the month</td></tr> 
  <tr><td>&#8226;</td><td class="nw">date --date='25 Dec' +%A</td><td>What day does xmas fall on, this year</td></tr> 
  <tr><td>&#8226;</td><td class="nw">date --date='@2147483647'</td><td>Convert seconds since the epoch (1970-01-01 UTC) to date</td></tr> 
  <tr><td>&#8226;</td><td class="nw">TZ='America/Los_Angeles' date</td><td>What time is it on west coast of US (use tzselect to find TZ)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">date --date='TZ="America/Los_Angeles" 09:00 next Fri'</td><td>What's the local time for 9AM next Friday on west coast US</td></tr> 
<p />
<tr id="locale" class="pbtitle"><td colspan="3"><b>locales</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">printf &quot;%'d\n&quot; 1234</td><td>Print number with thousands grouping appropriate to locale</td></tr> 
  <tr><td>&#8226;</td><td class="nw">BLOCK_SIZE=\'1 ls -l</td><td>Use locale thousands grouping in ls. See also l</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo &quot;I live in `locale territory`&quot;</td><td>Extract info from locale database</td></tr> 
  <tr><td>&#8226;</td><td class="nw">LANG=en_IE.utf8 locale int_prefix</td><td>Lookup locale info for specific country. See also ccodes</td></tr> 
  <tr><td>&#8226;</td><td class="nw">locale -kc $(locale | sed -n 's/\(LC_.\{4,\}\)=.*/\1/p') | less</td><td>List fields available in locale database</td></tr> 
<p />
<tr id="recode" class="pbtitle"><td colspan="3"><b>recode</b> (Obsoletes iconv, dos2unix, unix2dos)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">recode -l | less</td><td>Show available conversions (aliases on each line)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">recode windows-1252.. file_to_change.txt</td><td>Windows "ansi" to local charset (auto does CRLF conversion)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">recode utf-8/CRLF.. file_to_change.txt</td><td>Windows utf8 to local charset</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">recode iso-8859-15..utf8 file_to_change.txt</td><td>Latin9 (western europe) to utf8</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">recode ../b64 &lt; file.txt &gt; file.b64</td><td>Base64 encode</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">recode /qp.. &lt; file.qp &gt; file.txt</td><td>Quoted printable decode</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">recode ..HTML &lt; file.txt &gt; file.html</td><td>Text to HTML</td></tr> 
  <tr><td>&#8226;</td><td class="nw">recode -lf windows-1252 | grep euro</td><td>Lookup table of characters</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo -n 0x80 | recode latin-9/x1..dump</td><td>Show what a code represents in latin-9 charmap</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo -n 0x20AC | recode ucs-2/x2..latin-9/x</td><td>Show latin-9 encoding</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo -n 0x20AC | recode ucs-2/x2..utf-8/x</td><td>Show utf-8 encoding</td></tr> 
<p />
<tr id="CDs" class="pbtitle"><td colspan="3"><b><acronym title="Compact Disks">CDs</acronym></b></td></tr> 
  <tr><td>&nbsp;</td><td class="nw">gzip &lt; /dev/cdrom &gt; cdrom.iso.gz</td><td>Save copy of data cdrom</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">mkisofs -V LABEL -r dir | gzip &gt; cdrom.iso.gz</td><td>Create cdrom image from contents of dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">mount -o loop cdrom.iso /mnt/dir</td><td>Mount the cdrom image at /mnt/dir (read only)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">cdrecord -v dev=/dev/cdrom blank=fast</td><td>Clear a CDRW</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">gzip -dc cdrom.iso.gz | cdrecord -v dev=/dev/cdrom -</td><td>Burn cdrom image (use dev=ATAPI -scanbus to confirm dev)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">cdparanoia -B</td><td>Rip audio tracks from CD to wav files in current dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">cdrecord -v dev=/dev/cdrom -audio -pad *.wav</td><td>Make audio CD from all wavs in current dir (see also cdrdao)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">oggenc --tracknum='track' track.cdda.wav -o 'track.ogg'</td><td>Make ogg file from wav file</td></tr> 
<p />
<tr id="disk_space" class="pbtitle"><td colspan="3"><b>disk space</b> (See also FSlint)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ls -lSr</td><td>Show files by size, biggest last</td></tr> 
  <tr><td>&#8226;</td><td class="nw">du -s * | sort -k1,1rn | head</td><td>Show top disk users in current dir. See also dutop</td></tr> 
  <tr><td>&#8226;</td><td class="nw">du -hs /home/* | sort -k1,1<acronym title="available since coreutils 7.5">h</acronym></td><td>Sort paths by easy to interpret disk usage</td></tr> 
  <tr><td>&#8226;</td><td class="nw">df -h</td><td>Show free space on mounted filesystems</td></tr> 
  <tr><td>&#8226;</td><td class="nw">df -i</td><td>Show free inodes on mounted filesystems</td></tr> 
  <tr><td>&#8226;</td><td class="nw"><acronym title="usually in /sbin/">fdisk</acronym> -l</td><td>Show disks partitions sizes and types (run as root)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">rpm -q -a --qf '{SIZE}\t%{NAME}\n' | sort -k1,1n</td><td>List all packages by installed size (Bytes) on rpm distros</td></tr> 
  <tr><td>&#8226;</td><td class="nw">dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n</td><td>List all packages by installed size (KBytes) on deb distros</td></tr> 
  <tr><td>&#8226;</td><td class="nw">dd bs=1 seek=2TB if=/dev/null of=ext3.test</td><td>Create a large test file (taking no space). See also truncate</td></tr> 
  <tr><td>&#8226;</td><td class="nw">&gt; file</td><td>truncate data of file or create an empty file</td></tr> 
<p />
<tr id="monitor" class="pbtitle"><td colspan="3"><b>monitoring/debugging</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">tail -f /var/log/messages</td><td>Monitor messages in a log file</td></tr> 
  <tr><td>&#8226;</td><td class="nw">strace -c ls &gt;/dev/null</td><td>Summarise/profile system calls made by command</td></tr> 
  <tr><td>&#8226;</td><td class="nw">strace -f -e open ls &gt;/dev/null</td><td>List system calls made by command</td></tr> 
  <tr><td>&#8226;</td><td class="nw">strace -f -e trace=write -e write=1,2 ls &gt;/dev/null</td><td>Monitor what's written to stdout and stderr</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ltrace -f -e getenv ls &gt;/dev/null</td><td>List library calls made by command</td></tr> 
  <tr><td>&#8226;</td><td class="nw"><acronym title="usually in /usr/sbin/">lsof</acronym> -p <acronym title="process id of current shell">$$</acronym></td><td>List paths that process id has open</td></tr> 
  <tr><td>&#8226;</td><td class="nw">lsof ~</td><td>List processes that have specified path open</td></tr> 
  <tr><td>&#8226;</td><td class="nw">tcpdump not port 22</td><td>Show network traffic except ssh. See also tcpdump_not_me</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ps -e -o pid,args --forest</td><td>List processes in a hierarchy</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'</td><td>List processes by % cpu usage</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS</td><td>List processes by mem (KB) usage. See also ps_mem.py</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ps -C firefox-bin -L -o pid,tid,pcpu,state</td><td>List all threads for a particular process</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ps -p 1,$$ -o etime=</td><td>List elapsed wall time for particular process IDs</td></tr> 
  <tr><td>&#8226;</td><td class="nw">last reboot</td><td>Show system reboot history</td></tr> 
  <tr><td>&#8226;</td><td class="nw">free -m</td><td>Show amount of (remaining) RAM (-m displays in MB)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">watch -n.1 'cat /proc/interrupts'</td><td>Watch changeable data continuously</td></tr> 
  <tr><td>&#8226;</td><td class="nw">udevadm monitor</td><td>Monitor udev events to help configure rules</td></tr> 
<p />
<tr id="sysinfo" class="pbtitle"><td colspan="3"><b>system information</b> (see also sysinfo) ('#' means root access is required)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">uname -a</td><td>Show kernel version and system architecture</td></tr> 
  <tr><td>&#8226;</td><td class="nw">head -n1 /etc/issue</td><td>Show name and version of distribution</td></tr> 
  <tr><td>&#8226;</td><td class="nw">cat /proc/partitions</td><td>Show all partitions registered on the system</td></tr> 
  <tr><td>&#8226;</td><td class="nw">grep MemTotal /proc/meminfo</td><td>Show RAM total seen by the system</td></tr> 
  <tr><td>&#8226;</td><td class="nw">grep "model name" /proc/cpuinfo</td><td>Show CPU(s) info</td></tr> 
  <tr><td>&#8226;</td><td class="nw"><acronym title="usually in /sbin/">lspci</acronym> -tv</td><td>Show PCI info</td></tr> 
  <tr><td>&#8226;</td><td class="nw"><acronym title="usually in /sbin/">lsusb</acronym> -tv</td><td>Show USB info</td></tr> 
  <tr><td>&#8226;</td><td class="nw">mount | column -t</td><td>List mounted filesystems on the system (and align output)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">grep -F capacity: /proc/acpi/battery/BAT0/info</td><td>Show state of cells in laptop battery</td></tr> 
  <tr><td>#</td><td class="nw">dmidecode -q | less</td><td>Display SMBIOS/DMI information</td></tr> 
  <tr><td>#</td><td class="nw">smartctl -A /dev/sda | grep Power_On_Hours</td><td>How long has this disk (system) been powered on in total</td></tr> 
  <tr><td>#</td><td class="nw">hdparm -i /dev/sda</td><td>Show info about disk sda</td></tr> 
  <tr><td>#</td><td class="nw">hdparm -tT /dev/sda</td><td>Do a read speed test on disk sda</td></tr> 
  <tr><td>#</td><td class="nw">badblocks -s /dev/sda</td><td>Test for unreadable blocks on disk sda</td></tr> 
<p />
<tr id="interactive" class="pbtitle"><td colspan="3"><b>interactive</b> (see also linux keyboard shortcuts)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">readline</td><td>Line editor used by bash, python, bc, gnuplot, ...</td></tr> 
  <tr><td>&#8226;</td><td class="nw">screen</td><td>Virtual terminals with detach capability, ...</td></tr> 
  <tr><td>&#8226;</td><td class="nw">mc</td><td>Powerful file manager that can browse rpm, tar, ftp, ssh, ...</td></tr> 
  <tr><td>&#8226;</td><td class="nw">gnuplot</td><td>Interactive/scriptable graphing</td></tr> 
  <tr><td>&#8226;</td><td class="nw">links</td><td>Web browser</td></tr> 
  <tr><td>&#8226;</td><td class="nw">xdg-open <b>.</b></td><td>open a file or url with the registered desktop application</td></tr> 
<p />
<!--
<tr><td align="center" colspan="3">
<div style="padding-top:5px;">
<script type="text/javascript"><!-
google_ad_client = "pub-3527575214508372";
google_alternate_color = "FFFFC0";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "image";
//2006-10-04: cmdline_banner
google_ad_channel ="2479280376";
google_color_border = "FFFFC0";
google_color_bg = "FFFFC0";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "000000";
//-></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td></tr>
--> 
<p />
</tbody> 
</table> 
<p />
<p />
<p />
<table class="pixelbeat"> 
<tbody> 
<p />
<tr id="misc" class="pbtitle"><td colspan="2"><b>Command</b></td><td><b>Description</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">grep <b>.</b> /proc/sys/net/ipv4/*</td><td>List the contents of flag files</td></tr> 
  <tr><td>&#8226;</td><td class="nw">set | grep $USER</td><td>Search current environment</td></tr> 
  <tr><td>&#8226;</td><td class="nw">tr '\0' '\n' &lt; /proc/$$/environ</td><td>Display the <em>startup</em> environment for any process</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo $PATH | tr : '\n'</td><td>Display the $PATH one per line</td></tr> 
  <tr><td>&#8226;</td><td class="nw">kill -0 $$ &amp;&amp; echo process exists and can accept signals</td><td>Check for the existence of a process (pid)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">find /etc -readable | xargs less -K -p'*<font color="gray">ntp</font>' -j $((${LINES:-25}/2))</td><td>Search paths and data with full context. Use <b>n</b> to iterate</td></tr> 
<p />
<tr id="nice" class="pbtitle"><td colspan="3"><b>Low impact admin</b></td></tr> 
  <tr><td>#</td><td class="nw">apt-get install "package" -o Acquire::http::Dl-Limit=42 \<br/>-o Acquire::Queue-mode=access</td><td>Rate limit apt-get to 42KB/s</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">echo 'wget url' | at 01:00</td><td>Download url at 1AM to current dir</td></tr> 
  <tr><td>#</td><td class="nw">apache2ctl configtest &amp;&amp; apache2ctl graceful</td><td>Restart apache if config is OK</td></tr> 
  <tr><td>&#8226;</td><td class="nw">nice openssl speed sha1</td><td>Run a low priority command (openssl benchmark)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">renice 19 -p $$; ionice -c3 -p $$</td><td>Make shell (script) low priority. Use for non interactive tasks</td></tr> 
<p />
<tr id="monitor" class="pbtitle"><td colspan="3"><b>Interactive monitoring</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">watch -t -n1 uptime</td><td>Clock with system load</td></tr> 
  <tr><td>&#8226;</td><td class="nw">htop -d 5</td><td>Better top (scrollable, tree view, lsof/strace integration, ...)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">iotop</td><td>What's doing I/O</td></tr> 
  <tr><td>#</td><td class="nw">watch -d -n30 "nice ps_mem.py | tail -n $((${LINES:-12}-2))"</td><td>What's using RAM</td></tr> 
  <tr><td>#</td><td class="nw">iftop</td><td>What's using the network. See also iptraf</td></tr> 
  <tr><td>#</td><td class="nw">mtr www.pixelbeat.org</td><td>ping and traceroute combined</td></tr> 
<p />
<tr id="utilities" class="pbtitle"><td colspan="3"><b>Useful utilities</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">pv &lt; /dev/zero &gt; /dev/null</td><td>Progress Viewer for data copying from files and pipes</td></tr> 
  <tr><td>&#8226;</td><td class="nw">wkhtml2pdf http://.../linux_commands.html linux_commands.pdf</td><td>Make a pdf of a web page</td></tr> 
  <tr><td>&#8226;</td><td class="nw">timeout 1 sleep 3</td><td>run a command with bounded time. See also timeout</td></tr> 
<p />
<tr id="network" class="pbtitle"><td colspan="3"><b>Networking</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">python -m <acronym title="Use http.server for python 3">SimpleHTTPServer</acronym></td><td>Serve current directory tree at http://$HOSTNAME:8000/</td></tr> 
  <tr><td>&#8226;</td><td class="nw">openssl s_client -connect www.google.com:443 &lt;/dev/null 2&gt;&amp;0 |<br/>openssl x509 -dates -noout</td><td>Display the date range for a site's certs</td></tr> 
  <tr><td>&#8226;</td><td class="nw">curl -I www.pixelbeat.org</td><td>Display the server headers for a web site</td></tr> 
  <tr><td>#</td><td class="nw">lsof -i tcp:80</td><td>What's using port 80</td></tr> 
  <tr><td>#</td><td class="nw">httpd -S</td><td>Display a list of apache virtual hosts</td></tr> 
  <tr><td>&#8226;</td><td class="nw">vim scp://user@remote/<font color="gray">/path/to/file</font></td><td>Edit remote file using local vim. Good for high latency links</td></tr> 
  <tr><td>&#8226;</td><td class="nw">curl -s http://www.pixelbeat.org/pixelbeat.asc | gpg --import</td><td>Import a gpg key from the web</td></tr> 
  <tr><td>&#8226;</td><td class="nw"><acronym title="usually in /sbin/">tc</acronym> qdisc add dev lo root handle 1:0 netem delay 20msec</td><td>Add 20ms latency to loopback device (for testing)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">tc qdisc del dev lo root</td><td>Remove latency added above</td></tr> 
<p />
<tr id="notification" class="pbtitle"><td colspan="3"><b>Notification</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo &quot;DISPLAY=$DISPLAY xmessage cooker&quot; | at "NOW +30min"</td><td>Popup reminder</td></tr> 
  <tr><td>&#8226;</td><td class="nw">notify-send "subject" "message"</td><td>Display a gnome popup notification</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">echo &quot;mail -s 'go home' P&#64;draigBrady.com &lt; /dev/null&quot; | at 17:30</td><td>Email reminder</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">uuencode file name | mail -s subject P&#64;draigBrady.com</td><td>Send a file via email</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ansi2html.sh | mail -a "Content-Type: text/html" P&#64;draigBrady.com</td><td>Send/Generate HTML email</td></tr> 
<p />
<tr id="defaults" class="pbtitle"><td colspan="3"><b>Better default settings</b> (useful in your .bashrc)</td></tr> 
  <tr><td>#</td><td class="nw">tail -s.1 -f /var/log/messages</td><td>Display file additions more responsively</td></tr> 
  <tr><td>&#8226;</td><td class="nw">seq 100 | tail -n $((${LINES:-12}-2))</td><td>Display as many lines as possible without scrolling</td></tr> 
  <tr><td>#</td><td class="nw">tcpdump -s0</td><td>Capture full network packets</td></tr> 
<p />
<tr id="functions" class="pbtitle"><td colspan="3"><b>Useful functions/aliases</b> (useful in your .bashrc)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">md () { mkdir -p "$1" &amp;&amp; cd "$1"; }</td><td>Change to a new directory</td></tr> 
  <tr><td>&#8226;</td><td class="nw">strerror() { python -c "import os; print os.strerror($1)"; }</td><td>Display the meaning of an errno</td></tr> 
  <tr><td>&#8226;</td><td class="nw">plot() { { echo 'plot "-"' "$@"; cat; } | gnuplot -persist; }</td><td>Plot stdin. (e.g: &#8226; seq 1000 | sed 's/.*/s(&amp;)/' | bc -l | plot)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">hili() { e="$1"; shift; grep --col=always -Eih "$e|$" "$@"; }</td><td>highlight occurences of expr. (e.g: &#8226; env | hili $USER)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">alias hd='od -Ax -tx1z -v'</td><td>Hexdump. (usage e.g.: &#8226; hd /proc/self/cmdline | less)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">alias realpath='readlink -f'</td><td>Canonicalize path. (usage e.g.: &#8226; realpath ~/../$USER)</td></tr> 
<p />
<tr id="multimedia" class="pbtitle"><td colspan="3"><b>Multimedia</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">DISPLAY=:0.0 import -window root orig.png</td><td>Take a (remote) screenshot</td></tr> 
  <tr><td>&#8226;</td><td class="nw">convert -filter catrom -resize '600x&gt;' orig.png 600px_wide.png</td><td>Shrink to width, computer gen images or screenshots</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">mplayer -ao pcm -vo null -vc dummy /tmp/Flash*</td><td>Extract audio from flash video to audiodump.wav</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">ffmpeg -i filename.avi</td><td>Display info about multimedia file</td></tr> 
  <tr><td>&#8226;</td><td class="nw">ffmpeg -f x11grab -s xga -r 25 -i :0 -sameq demo.mpg</td><td>Capture video of an X display</td></tr> 
<p />
<tr id="DVD" class="pbtitle"><td colspan="3"><b>DVD</b></td></tr> 
  <tr><td>&nbsp;</td><td class="nw">for i in $(seq 9); do ffmpeg -i $i.avi -target pal-dvd $i.mpg; done</td><td>Convert video to the correct encoding and aspect for DVD</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">dvdauthor -odvd -t -v "pal,4:3,720xfull" *.mpg;dvdauthor -odvd -T</td><td>Build DVD file system. Use 16:9 for widescreen input</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">growisofs -dvd-compat -Z /dev/dvd -dvd-video dvd</td><td>Burn DVD file system to disc</td></tr> 
<p />
<tr id="unicode" class="pbtitle"><td colspan="3"><b>Unicode</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">python -c "import unicodedata as u; print u.name(unichr(0x2028))"</td><td>Lookup a unicode character</td></tr> 
  <tr><td>&#8226;</td><td class="nw">uconv -f utf8 -t utf8 -x nfc</td><td>Normalize combining characters</td></tr> 
  <tr><td>&#8226;</td><td class="nw">printf '\300\200' | iconv -futf8 -tutf8 &gt;/dev/null</td><td>Validate UTF-8</td></tr> 
  <tr><td>&#8226;</td><td class="nw">printf '&#360;TF8\n' | LANG=C grep --color=always '[^ -~]\+'</td><td>Highlight non printable ASCII chars in UTF-8</td></tr> 
  <tr><td>&#8226;</td><td class="nw">fc-match -s "sans:lang=zh"</td><td>List font match order for language and style</td></tr> 
<p />
<tr id="development" class="pbtitle"><td colspan="3"><b>Development</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">gcc -march=native -E -v -&lt;/dev/null 2&gt;&amp;1|sed -n 's/.*-mar/-mar/p'</td><td>Show autodetected gcc tuning params. See also gcccpuopt</td></tr> 
  <tr><td>&#8226;</td><td class="nw">for i in $(seq 4); do { [ $i = 1 ] &amp;&amp; wget http://url.ie/6lko -qO-||<br/>./a.out; } | tee /dev/tty | gcc -xc - 2&gt;/dev/null; done</td><td>Compile and execute C code from stdin</td></tr> 
  <tr><td>&#8226;</td><td class="nw">cpp -dM /dev/null</td><td>Show all predefined macros</td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo "#include &lt;features.h&gt;" | cpp -dN | grep "#define __USE_"</td><td>Show all glibc feature macros</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">gdb -tui</td><td>Debug showing source code context in separate windows</td></tr> 
<p />
<tr id="xattr" class="pbtitle"><td colspan="3"><b>Extended Attributes</b> (Note you may need to (re)mount with "acl" or "user_xattr" options)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">getfacl <b>.</b></td><td>Show <acronym title="Access Control Lists">ACLs</acronym> for file</td></tr> 
  <tr><td>&#8226;</td><td class="nw">setfacl -m u:nobody:r <b>.</b></td><td>Allow a specific user to read file</td></tr> 
  <tr><td>&#8226;</td><td class="nw">setfacl -x u:nobody <b>.</b></td><td>Delete a specific user's rights to file</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">setfacl --default -m group:users:rw- dir/</td><td>Set umask for a for a specific dir</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">getcap file</td><td>Show capabilities for a program</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">setcap cap_net_raw+ep your_gtk_prog</td><td>Allow <acronym title="GTK programs can't run as root">gtk program</acronym> raw access to network</td></tr> 
  <tr><td>&#8226;</td><td class="nw">stat -c%C <b>.</b></td><td>Show SELinux context for file</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">chcon ... file</td><td>Set SELinux context for file (see also restorecon)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">getfattr -m- -d <b>.</b></td><td>Show all extended attributes (includes selinux,acls,...)</td></tr> 
  <tr><td>&#8226;</td><td class="nw">setfattr -n "user.foo" -v "bar" <b>.</b></td><td>Set arbitrary user attributes</td></tr> 
<p />
<tr id="bash" class="pbtitle"><td colspan="3"><b>BASH specific</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">echo 123 | tee &gt;(tr 1 a)  | tr 1 b</td><td>Split data to 2 commands (using process substitution)</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">meld local_file &lt;(ssh host cat remote_file)</td><td>Compare a local and remote file (using process substitution)</td></tr> 
<p />
<tr id="multicore" class="pbtitle"><td colspan="3"><b>Multicore</b></td></tr> 
  <tr><td>&#8226;</td><td class="nw">taskset -c 0 nproc</td><td>Restrict a command to certain processors</td></tr> 
  <tr><td>&#8226;</td><td class="nw">find -type f -print0 | xargs -r0 -P$(nproc) -n<acronym title="batch size for each parallel process">10</acronym> md5sum</td><td>Process files in parallel over available processors</td></tr> 
  <tr><td>&nbsp;</td><td class="nw">sort -m &lt;(sort data1) &lt;(sort data2) &gt;data.sorted<td>Sort separate data files over 2 processors</td></tr> 
</tbody> 
</table>
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> 100 hectareas in ensenada </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry170" />
<id>tag:wiki.biohack.net,2011-03-22:Main.WillNorris.BlogEntry170</id>
<updated>2011-03-22T18:28:27Z</updated>
<published>2011-03-22T18:16:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;t=p&amp;ll=32.266814,-116.136475&amp;spn=0.041223,0.110378&amp;z=13&amp;output=embed"></iframe><br /><small>View Larger Map</small> <p />
listing: <ul>
<li> http://www.bienesonline.com/mexico/detalle-propiedad/RAV19401
</li></ul> 
<p />
pictures: <ul>
<li> https://picasaweb.google.com/jehurale/RanchoChimeneasSierraDeJuarez
</li> <li> https://picasaweb.google.com/jehurale/RinconadaChimeneas
</li> <li> satellite photos
</li></ul> 
<p />
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> straw bale housing </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry169" />
<id>tag:wiki.biohack.net,2011-03-03:Main.WillNorris.BlogEntry169</id>
<updated>2011-03-03T20:31:41Z</updated>
<published>2011-03-03T18:14:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  http://en.wikipedia.org/wiki/Straw-bale_construction <p /> <ul>
<li> http://www.balewatch.com/ - 59 plans
</li> <li> http://www.solarhaven.org/StarterStrawBale.htm
</li> <li> http://www.grisb.org/consulting.htm
</li> <li> http://wiki.answers.com/Q/How_many_square_bails_can_you_get_out_of_an_acre_of_hay
</li> <li> http://www.greenhomebuilding.com/strawbale.htm
</li></ul> 
<p /> <ul>
<li> http://www.amazon.com/Design-Straw-Bale-Buildings-State/dp/0976491117
</li> <li> http://www.amazon.com/Building-Straw-Gernot-Minke/dp/3764371714
</li> <li> 
</li> <li> 
</li></ul> 
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> open source Deluxe Paint alternatives  </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry168" />
<id>tag:wiki.biohack.net,2011-03-02:Main.WillNorris.BlogEntry168</id>
<updated>2011-03-02T21:52:09Z</updated>
<published>2011-03-02T17:53:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  http://en.wikipedia.org/wiki/Deluxe_Paint <p /> <ul>
<li> http://code.google.com/p/grafx2/
</li> <li> i.Mage
</li></ul> 
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> open source (2d) platformer game (engines) </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry167" />
<id>tag:wiki.biohack.net,2011-03-02:Main.WillNorris.BlogEntry167</id>
<updated>2011-03-02T22:14:34Z</updated>
<published>2011-03-02T16:35:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  http://petermcclory.com/free-playable-2d-indie-platform-games/ <p />
ķITTABLE{}%
<table cellspacing="0" id="table1" cellpadding="0" class="foswikiTable" rules="rows" border="1">
	<thead>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <font color="#ffffff">Project</font> </th>
			<th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <font color="#ffffff">Language</font> </th>
			<th bgcolor="#687684" valign="top" class="foswikiTableCol2"> <font color="#ffffff">Platforms</font> </th>
			<th bgcolor="#687684" valign="top" class="foswikiTableCol3 foswikiLastCol"> <font color="#ffffff">Notes</font> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> Secret Maryo Chronicles </td>
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> C++ </td>
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol2"> &nbsp; </td>
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol3 foswikiLastCol"> Inkscape </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> JGame </td>
			<td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Java </td>
			<td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2"> Java (and mobile Java); android in progress </td>
			<td bgcolor="#edf4f9" valign="top" class="foswikiTableCol3 foswikiLastCol"> &nbsp; </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> jetblade </td>
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> Python (and C) </td>
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLast"> &nbsp; </td>
			<td bgcolor="#ffffff" valign="top" class="foswikiTableCol3 foswikiLastCol foswikiLast"> &nbsp; </td>
		</tr>
	</tbody></table>
<p />
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> maryland lots </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry166" />
<id>tag:wiki.biohack.net,2011-02-22:Main.WillNorris.BlogEntry166</id>
<updated>2011-02-22T01:35:20Z</updated>
<published>2011-02-22T00:14:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> http://www.landwatch.com/Somerset-County-Maryland-Land-for-sale/pid/172345958
</li> <li> http://www.landwatch.com/Saint-Marys-County-Maryland-Land-for-sale/pid/172584611
</li> <li> http://www.landwatch.com/Kent-County-Maryland-Land-for-sale/pid/119859783
</li></ul> 
<p />
<br>Map Courtesy of Digital-Topo-Maps.com
<p /> <ul>
<li> http://www.dnr.state.md.us/land/rurallegacy/index.asp
</li> <li> http://www.extension.umn.edu/distribution/naturalresources/DD0583.html
</li></ul> 
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> generating test data </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry165" />
<id>tag:wiki.biohack.net,2011-02-18:Main.WillNorris.BlogEntry165</id>
<updated>2011-02-18T22:41:27Z</updated>
<published>2011-02-15T20:59:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> http://search.cpan.org/~jingram/Data-Maker-0.27/lib/Data/Maker.pm
</li> <li> http://search.cpan.org/~jasonk/Data-Faker-0.07/
</li></ul> 
<p /> <ul>
<li> http://search.cpan.org/~tima/Text-Greeking-0.11/lib/Text/Greeking.pm
</li></ul> 
<p /> <ul>
<li> http://www.kleimo.com/random/name.cfm
</li> <li> http://www.fakenamegenerator.com/gen-random-us-us.php
</li> <li> http://www.fakenamegenerator.com/order.php
</li> <li> http://www.identitygenerator.com/<!-- -->
</li></ul> 
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> canning </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry164" />
<id>tag:wiki.biohack.net,2011-01-20:Main.WillNorris.BlogEntry164</id>
<updated>2011-01-20T05:52:52Z</updated>
<published>2011-01-20T05:49:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> http://www.foodinjars.com/2010/06/where-to-buy-jars-for-canning/<!-- -->
</li></ul> 
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> emacs tramp mode </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry163" />
<id>tag:wiki.biohack.net,2011-02-25:Main.WillNorris.BlogEntry163</id>
<updated>2011-02-25T04:32:02Z</updated>
<published>2011-01-19T04:10:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <code>C-x C-f /remotehost:filename&nbsp; RET</code> <p /> <ul>
<li> http://www.emacswiki.org/cgi-bin/wiki/TrampMode
</li></ul> 
<p />
(installed by default on ubuntu 10.10; TrampMode is a part of Emacs starting with version 22.1)
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> emacs psvn </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry162" />
<id>tag:wiki.biohack.net,2011-02-25:Main.WillNorris.BlogEntry162</id>
<updated>2011-02-25T04:27:39Z</updated>
<published>2011-01-19T04:05:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> http://www.xsteve.at/prg/vc_svn/ <ul>
<li> http://www.tedcarnahan.com/2008/10/24/a-brief-introduction-to-emacs-psvn/<!-- -->
</li></ul> 
</li></ul> 
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> cvs2github </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry160" />
<id>tag:wiki.biohack.net,2010-10-19:Main.WillNorris.BlogEntry160</id>
<updated>2010-10-19T05:18:25Z</updated>
<published>2010-04-30T20:30:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  world foundry cvs <p />   * http://www.eyrie.org/~eagle/notes/debian/git.html <ul>
<li> https://sourceforge.net/apps/trac/sourceforge/wiki/Git#Access
</li> <li> http://github.com/WorldFoundry/World-Foundry
</li></ul> 
<pre>
  cd existing&#95;git&#95;repo
  git remote add origin git&#64;github.com:WorldFoundry/World-Foundry.git
  git push origin master
</pre>
<p />
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> yo frankie! </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry159" />
<id>tag:wiki.biohack.net,2010-10-19:Main.WillNorris.BlogEntry159</id>
<updated>2010-10-19T19:03:13Z</updated>
<published>2010-02-20T16:46:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  a 3d level game created with blender
<p />
<object width="640" height="390"><param name="movie" value="http://www.youtube.com/v/c7RRaEvWqJc&amp;hl=en_US&amp;feature=player_embedded&amp;version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/c7RRaEvWqJc&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></embed></object> <p />http://www.yofrankie.org/
<p />
<pre>
wbniv&#64;wbniv-laptop:~/yofrankie$ svn info
Path: .
URL: https://svn.blender.org/svnroot/yofrankie
Repository Root: https://svn.blender.org/svnroot/yofrankie
Repository UUID: 25262666-f3c1-dd11-aff7-0030488c597c
Revision: 92
Node Kind: directory
Schedule: normal
Last Changed Author: campbellbarton
Last Changed Rev: 92
Last Changed Date: 2010-02-20 05:58:35 -0600 (Sat, 20 Feb 2010)
</pre>
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> distribute binary payloads bundled in a perl script </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry158" />
<id>tag:wiki.biohack.net,2010-02-09:Main.WillNorris.BlogEntry158</id>
<updated>2010-02-09T11:39:01Z</updated>
<published>2010-02-09T06:56:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <pre>
my $data &#61; join( &#39;&#39;, &#60;main::DATA&#62; );
my &#64;archive &#61; ( $data &#61;~ /(begin 0?\d{3}.&#42;?end)/gs );     # SMELL: regex could be tighter
# make accessible via hash keyed off the uuencoded &#39;name&#39; field
my &#37;archive &#61; map { /^begin\s+0?\d{3}\s+(.+?)\n/; ( $1 &#61;&#62; $&#95; ) } &#64;archive;
</pre> <p />in order to create a single, downloadable file for the Foswiki installer located at http://foswiki.org/Support/FoswikiOnLinuxSharedHostCommandShell, i needed a way to "attach" binary files to a perl script.  here's what i came up with:
<p /> <ol>
<li> <code>uuencode</code> the binary files,
</li> <li> place the pure perl module CPAN:Convert::UU at the end of my installation script,
</li> <li> place an <code>__END__</code> section below that,
</li> <li> and finally, below the <code>__END__</code>, the uuencoded binary files.
</li></ol> 
<p />
the resulting file looks (approximately) like this:
<pre>
#! /usr/bin/perl -w
# .
# .
exit 0;

package Convert::UU;
# .
# .
1;
&#95;&#95;END&#95;&#95;
begin 0644 Foswiki-1.0.9.tgz
M&#39;XL(`+P;4TL``^Q;6W,427;FU?H5N1(,$JLNJ74#M,!8&#64;!BP$;&#34;26+R&#62;BR&#42;&#91;
M&#42;KL&#91;475EN;)&#42;4A/\F7GT`P^.&#62;?.K&#95;IB&#95;&#60;S+KUMVZ8#&#39;K&#60;.SVQ(CNJJR3YWZ^
.
.
7^?&#91;Y&#95;OG^^?&#91;Y&#95;OES/&#95;\&#95;GLANXP!`\0``
`
end
begin 0644 FastCGIEngineContrib.tgz
M&#39;XL(`&#39;.91$L``^Q&#60;&#62;U?;2++/W&#95;H4&#39;0(+)&#39;X`&#34;62.P4P&#60;8QC?Y75M,YD&#60;AN7(
.
.
MI&#95;4RO3J$JD44B:;M5FW&#38;C&#64;0WGZ]L&#91;5-&#34;\94X?3.540],&#91;R+L+&#61;,R+&#61;,R+&#61;,R
4+&#61;,R+&#61;,R+&#61;,/G?X+C&#64;&#38;&#42;80&#34;&#64;````
`
end
</pre>
<p />
the code snippet above searches for the files in the <code>__DATA__</code> section, and makes the uuencoded files available to the script by either an array index or a hash lookup in the <code>archive</code> variables:
<p />
<pre>
# use the first slot (0), which is spec&#39;ed to contain a Foswiki distribution
my ($binfile) &#61; Convert::UU::uudecode( $archive&#91;0] );  
my ($binfile) &#61; Convert::UU::uudecode( $archive{&#39;FastCGIEngineContrib.tgz&#39;} );
</pre>
<p />
for distribution, <code>gzip</code> the script file, and everything shrinks back down to <em>almost</em> the same size as it all was before uuencoding everything.
<p />
TODO: yes, i should make the "parser" <code>uudecode</code> the "files", too.
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> so you want to marry a mexican? </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry157" />
<id>tag:wiki.biohack.net,2010-02-08:Main.WillNorris.BlogEntry157</id>
<updated>2010-02-08T04:22:55Z</updated>
<published>2010-02-08T03:43:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  
http://www.mexconnect.com/articles/747-so-you-want-to-marry-a-mexican <p /><!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> upgrading BlogPlugin to Foswiki </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry154" />
<id>tag:wiki.biohack.net,2010-01-21:Main.WillNorris.BlogEntry154</id>
<updated>2010-01-21T01:08:37Z</updated>
<published>2010-01-20T02:43:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  SubjectCategory seems to be broken <p />
required changes: <ol>
<li> de-(T)mWiki
</li></ol> 
<p /> <ol>
 <li>
 <ol>
<li> TWikiForm -&gt; WikiForm; TWikiForms -&gt; WikiForms; TWikiFormAttribute -&gt; WikiFormAttribute; RenderTWikiFormList -&gt; RenderWikiFormList <ul>
<li> <code>sed -i -e 's/TWikiForm/WikiForm/g' *.txt</code>
</li></ul> 
</li> <li> RenderNewTWikiTopicButton -&gt; RenderNewWikiTopicButton <ul>
<li> <code>sed -i -e 's/TWikiTopic/WikiTopic/g' *.txt</code>
</li></ul> 
</li></ol> 
</li></ol> 
<p />
RenderBlogArchiveLex.txt
&lt; ~~~   map="twiki=TWiki"
&gt;<cite> ~~~   map="foswiki=Foswiki"</cite><br />
<p />
TWikiForm.txt
&lt; WikiForms add structured information to twiki topics.
&gt;<cite> WikiForms add structured information to topics.</cite><br />
<p />
TWikiTopic.txt (normal TWiki topic-&gt;normal topic)
<p /> <ol>
 <li>
 <ol>
<li> remaining TWiki -&gt; Foswiki <ul>
<li> <code>sed -i -e 's/TWiki/Foswiki/g' *.txt</code>
</li></ul> 
</li></ol> 
</li></ol> 
<p />
<code>sed -i -e 's/value="enabled"/value="published"/' BlogEntry???.txt</code>
<code>sed -i -e 's/value="disabled"/value="unpublished"/' BlogEntry???.txt</code>
<p />
<pre>
changed RenderBlogEntry.txt: &#60;span class&#61;\&#34;blogAuthor\&#34;&#62;by &#91;&#91;Main.WillNorris.$formfield(BlogAuthor)]&#91;$formfield(BlogAuthor)]] &#60;/span&#62;
to: &#60;span class&#61;\&#34;blogAuthor\&#34;&#62;by &#91;&#91;&#37;USERSWEB&#37;.$formfield(BlogAuthor)]&#91;$formfield(BlogAuthor)]] &#60;/span&#62;
</pre>
<p />
still to do:
<p /> <ol>
<li> enabled/disabled -&gt; published/unpublished <ul>
<li> need to support topics with either set
</li> <li> BlogEntry, BlogEntryForm, BlogPageForm, RenderArchives, RenderBlogArchiveCat, RenderBlogArchiveChron, RenderBlogArchiveHitList, RenderBlogArchiveTag, RenderBlogEntry, RenderCategories, RenderDocNavigation, RenderFrontPage, RenderFrontTeaser, RenderPages, RenderRecentPostings, RenderRelatedEntries, RenderUnpublishedBlogEntries, WebAtom, WebAtomTeaser, WebRss, WebRssCombined, WebRssTeaser
</li></ul> 
</li></ol> 
<p />
<pre>
</pre>
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> add comments to system docs at foswiki.org (like the php online docs) </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry152" />
<id>tag:wiki.biohack.net,2010-01-15:Main.WillNorris.BlogEntry152</id>
<updated>2010-01-15T08:29:19Z</updated>
<published>2010-01-15T08:23:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> http://www.twiki.org/irc/irclogger_log/twiki?date=2004-09-05,Sun&amp;sel=205#l201
</li></ul> 
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry>
<entry>
<title> marriage in quebec </title>
<link rel="alternate" type="text/html" href="http://wiki.biohack.net/bin/view/Main.WillNorris/BlogEntry151" />
<id>tag:wiki.biohack.net,2009-11-18:Main.WillNorris.BlogEntry151</id>
<updated>2009-11-18T18:16:10Z</updated>
<published>2009-11-18T18:05:00Z</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">  <p /> <ul>
<li> Request for the Designation of an Officiant of a Marriage or Civil Union (SJ-893A)
</li> <li> Civil Marriage - General Information (SJ-217A)
</li> <li> Civil marriage and civil union costs - CDN$247
</li></ul> 
<!-- -->
<!-- --> </div>
</content>
<author>
<name>WillNorris</name><uri>http://wiki.biohack.net/bin/viewMain/WillNorris</uri>
</author>
<category term="" label="" />
<contributor>
<name>WillNorris</name>
</contributor>
</entry> </feed>
