<?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>gimi&#039;s snippets</title>
	<atom:link href="http://gimi.name/snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://gimi.name/snippets</link>
	<description>A personal collection of instructions, scripts and programs.</description>
	<lastBuildDate>Sun, 19 Jun 2011 12:41:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple but effective JPG image recovery tool written in c: jpeg-recover2</title>
		<link>http://gimi.name/snippets/simple-but-effective-jpg-image-recovery-tool-written-in-c-jpeg-recover2/</link>
		<comments>http://gimi.name/snippets/simple-but-effective-jpg-image-recovery-tool-written-in-c-jpeg-recover2/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 12:41:36 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[jpg]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[picture]]></category>
		<category><![CDATA[recover]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[scan]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=220</guid>
		<description><![CDATA[This is a c implementation of the jpeg-recover from Adam Glass written in perl. 
Though I was happy to see quite a lot images restored from my camera&#8217;s memory card using the original tool, it was way to slow for the 4gb it had to process. So this program was written and extended in some [...]]]></description>
		<wfw:commentRss>http://gimi.name/snippets/simple-but-effective-jpg-image-recovery-tool-written-in-c-jpeg-recover2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>urlencode and urldecode for bash scripting using sed</title>
		<link>http://gimi.name/snippets/urlencode-and-urldecode-for-bash-scripting-using-sed/</link>
		<comments>http://gimi.name/snippets/urlencode-and-urldecode-for-bash-scripting-using-sed/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 12:00:22 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=212</guid>
		<description><![CDATA[To urlencode or -decode strings in bash scripts, one can use simple sed scripts containing one rule for every character. You can download the urlencode.sed and urldecode.sed files.

url=&#34;http://gimi.name/snippets/urlencode-and-urldecode-for-bash-scripting-using-sed?randomOption=foo,bar,baz&#34;
encodedUrl=$&#40;echo &#34;$url&#34; &#124; sed -f urlencode.sed&#41;
url=$&#40;echo &#34;$encodedUrl&#34; &#124; sed -f urldecode.sed&#41;
&#160;
echo &#34;encoded: $encodedUrl&#34;
echo &#34;decoded: $url&#34;

Result:

encoded: http%3a%2f%2fgimi%2ename%2fsnippets%2furlencode%2dand%2durldecode%2dfor%2dbash%2dscripting%2dusing%2dsed%3frandomOption=foo%2cbar%2cbaz
decoded: http://gimi.name/snippets/urlencode-and-urldecode-for-bash-scripting-using-sed?randomOption=foo,bar,baz

]]></description>
		<wfw:commentRss>http://gimi.name/snippets/urlencode-and-urldecode-for-bash-scripting-using-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wget download and index script</title>
		<link>http://gimi.name/snippets/wget-download-and-index-script/</link>
		<comments>http://gimi.name/snippets/wget-download-and-index-script/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 20:07:23 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Handy]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[save]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=205</guid>
		<description><![CDATA[Sometimes there is the need for local copies of websites one found interesting or one has to work with later. This script downloads a single page including pictures and style of a website using wget. For convenience there is an index generated which contains links to all fetched pages in the same directory as well [...]]]></description>
		<wfw:commentRss>http://gimi.name/snippets/wget-download-and-index-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract ogg audio from any clip like flv, mp4, mov, wmv</title>
		<link>http://gimi.name/snippets/extract-ogg-audio-from-any-clip-like-flv-mp4-mov-wmv/</link>
		<comments>http://gimi.name/snippets/extract-ogg-audio-from-any-clip-like-flv-mp4-mov-wmv/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 21:06:32 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Handy]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=199</guid>
		<description><![CDATA[I like to download youtube videos using youtube-dl. Sometimes an audio file of that clip would be cool. This can by done with 2ogg movie_file.mp4 "artist name" "song name"

#!/bin/bash
&#160;
# 2ogg: Takes given video to play with mplayer and encode audio to an ogg file.
# Consider the loss of quality.
&#160;
if &#91;&#91; $# -ne 1 &#38;&#38; $# [...]]]></description>
		<wfw:commentRss>http://gimi.name/snippets/extract-ogg-audio-from-any-clip-like-flv-mp4-mov-wmv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitor directory transfer rates e.g. while copying</title>
		<link>http://gimi.name/snippets/monitor-directory-transfer-rates-e-g-while-copying/</link>
		<comments>http://gimi.name/snippets/monitor-directory-transfer-rates-e-g-while-copying/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 20:32:28 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Copy]]></category>
		<category><![CDATA[Direcotry]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Monitor]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=196</guid>
		<description><![CDATA[This script, let&#8217;s call it dirmon, monitors a directory and outputs current change (transfer) rate per second and total disk usage.
It could look like:

gimi@t8417:~$ dirmon /tmp/
14Byte/s, 211 KBytes total

The code:

#!/bin/bash
&#160;
# notice: this approach assumes 'du' being very quick
#         if it's not, rates will appear higher
&#160;
function getSize&#40;&#41; &#123;
	du [...]]]></description>
		<wfw:commentRss>http://gimi.name/snippets/monitor-directory-transfer-rates-e-g-while-copying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update Banshee&#8217;s internal audio file URIs after moving</title>
		<link>http://gimi.name/snippets/update-banshees-internal-audio-file-uris-after-moving/</link>
		<comments>http://gimi.name/snippets/update-banshees-internal-audio-file-uris-after-moving/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 21:28:41 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Banshee]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=194</guid>
		<description><![CDATA[After moving the audio library to another place, the internal URIs of music known to Banshee has to be updated. There is no perfect way implemented into banshee. But maybe the &#8220;Rescan Music Library&#8221; works for you. If not, it&#8217;s easy to update its database because great sqlite3 is used.

# necessary tool installed?
sudo apt-get install [...]]]></description>
		<wfw:commentRss>http://gimi.name/snippets/update-banshees-internal-audio-file-uris-after-moving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peek Tiny URL from bit.ly, tiny.cc, etc</title>
		<link>http://gimi.name/snippets/peek-tiny-url-from-bit-ly-tiny-cc-etc/</link>
		<comments>http://gimi.name/snippets/peek-tiny-url-from-bit-ly-tiny-cc-etc/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 21:26:44 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[fopen]]></category>
		<category><![CDATA[head]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tiny url]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=183</guid>
		<description><![CDATA[If you want to see full addresses from URL shortening services like bit.ly (see Twitter), tiny.cc, tinyurl.com or even gimi.name/go I got something for you.
This code just looks up the redirection address and returns it to you. Every service with immediate redirection should work, because they use the same method.

function peekTinyURL&#40;$url&#41; &#123;
	$context = stream_context_create&#40;array&#40;'http' =&#62; [...]]]></description>
		<wfw:commentRss>http://gimi.name/snippets/peek-tiny-url-from-bit-ly-tiny-cc-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd and PHP for Ubuntu</title>
		<link>http://gimi.name/snippets/lighttpd-and-php-for-ubuntu/</link>
		<comments>http://gimi.name/snippets/lighttpd-and-php-for-ubuntu/#comments</comments>
		<pubDate>Thu, 06 May 2010 10:12:14 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=178</guid>
		<description><![CDATA[
sudo apt-get install lighttpd php5-cgi
sudo lighty-enable-mod fastcgi
sudo /etc/init.d/lighttpd force-reload

]]></description>
		<wfw:commentRss>http://gimi.name/snippets/lighttpd-and-php-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NFS Mount fails: &#8220;RPC Error: Success&#8221;</title>
		<link>http://gimi.name/snippets/nfs-mount-fails-rpc-error-success/</link>
		<comments>http://gimi.name/snippets/nfs-mount-fails-rpc-error-success/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 20:28:45 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=176</guid>
		<description><![CDATA[mount.nfs: mount to NFS server '$host:/$path' failed: RPC Error: Success
Solution:
mount -o nfsvers=2 $host:/$path $dst
]]></description>
		<wfw:commentRss>http://gimi.name/snippets/nfs-mount-fails-rpc-error-success/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Banshee and a &#8220;Mass Storage Media Player&#8221;</title>
		<link>http://gimi.name/snippets/banshee-and-a-mass-storage-media-player/</link>
		<comments>http://gimi.name/snippets/banshee-and-a-mass-storage-media-player/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 19:27:09 +0000</pubDate>
		<dc:creator>gimi</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Banshee]]></category>
		<category><![CDATA[Cards]]></category>
		<category><![CDATA[Mass Storage]]></category>
		<category><![CDATA[Media Player]]></category>
		<category><![CDATA[Phone]]></category>
		<category><![CDATA[player]]></category>

		<guid isPermaLink="false">http://gimi.name/snippets/?p=174</guid>
		<description><![CDATA[
cd /media/$device
touch .is_audio_player

Works with SD or Phone Cards &#8230;
This is more like a hack for standart USB devices.
Thanks to hyperair.
]]></description>
		<wfw:commentRss>http://gimi.name/snippets/banshee-and-a-mass-storage-media-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

