<?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>Wishful Coding</title>
	<atom:link href="http://pepijndevos.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://pepijndevos.nl</link>
	<description>Didn&#039;t you ever wish your computer understood you?</description>
	<lastBuildDate>Mon, 08 Mar 2010 17:45:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Three good reasons to run a Webkit Nightly</title>
		<link>http://pepijndevos.nl/2010/03/three-good-reasons-ton-run-a-webkit-nightly/</link>
		<comments>http://pepijndevos.nl/2010/03/three-good-reasons-ton-run-a-webkit-nightly/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 17:34:50 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=300</guid>
		<description><![CDATA[
You get to use the latest an coolest features around.
You can try out my 3D CSS browser game, which is finally online.
You can see this wacky CSS endless zoom effect, and other beautiful show-offs.

No, seriously&#8230; You might not need it for daily web usage, but if you are a developer, it&#8217;s fun! Get it at [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>You get to use the <a href="http://webkit.org/demos/">latest an coolest features</a> around.</li>
<li>You can try out my <a href="http://metapep.wordpress.com/2009/10/27/webkit-feature-test/">3D CSS browser game</a>, which is <a href="http://pepijndevos.nl/cgi-bin/comet/">finally online</a>.</li>
<li>You can see this <a href="http://pepijndevos.nl/projects/endlesszoom/">wacky CSS endless zoom effect</a>, and <a href="http://css-vfx.googlecode.com/svn/trunk/examples/zflow_snow.html">other beautiful show-offs</a>.</li>
</ol>
<p>No, seriously&#8230; You might not need it for daily web usage, but if you are a developer, it&#8217;s fun! Get it at <a href="http://nightly.webkit.org/">webkit.org</a>, even the nightly is more reliable than IE6. I&#8217;m using it right now to write this.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li>No related posts.</li>
	</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/03/three-good-reasons-ton-run-a-webkit-nightly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Python/web.py on a shared host</title>
		<link>http://pepijndevos.nl/2010/03/install-python-on-shared-host/</link>
		<comments>http://pepijndevos.nl/2010/03/install-python-on-shared-host/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 16:13:41 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cgi bin]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web.py]]></category>
		<category><![CDATA[webhosting]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=268</guid>
		<description><![CDATA[In the past I have written a few Python web applications, but when I asked my host about Python, they told me they where specialized in PHP and nothing but PHP(that is why this site runs Wordpress).
If your are lucky and have a very expensive dedicated server you can install whatever you want, but how [...]]]></description>
			<content:encoded><![CDATA[<p>In the past I have written a few Python web applications, but when I asked my host about Python, they told me they where specialized in PHP and nothing but PHP(that is why this site runs Wordpress).</p>
<p>If your are lucky and have a very expensive dedicated server you can install whatever you want, but how about my poor projects? I&#8217;m not going to re-write them in PHP obviously.</p>
<p>I figured that as long as you have a CGI bin, you can do whatever you want. I started writing a CGI script that would install Python and Web.py for me; <a href="http://pepijndevos.nl/cgi-bin/python/webpy.cgi/blog-reader">Check out the resulting web.py example.</a></p>
<p>This is the script that I came up with. It should be doable to customize this for Pylons, TurboGears, Django, or any other Python framework.</p>
<p>You should at least fill in your own home directory twice, we&#8217;re doing a Python installation inside you home directory.</p>
<pre>#!/bin/sh

echo "Content-type: text/html

";

curl http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz | tar -zx
cd Python-2.6.4
./configure --prefix=/your/home/directory #change this to your home
make
make install
cd ..
curl http://www.saddi.com/software/flup/dist/flup-1.0.2.tar.gz | tar -zx
cd flup-1.0.2
/your/home/directory/bin/python setup.py install
cd ..
curl http://webpy.org/static/web.py-0.33.tar.gz | tar -zx
cp -r web.py-0.33/web .</pre>
<p>Note that you should add .py as a CGI handler in your .htaccess file:</p>
<pre>AddHandler cgi-script .py</pre>
<p>Since our fresh Python installation is not on the PATH variable, you should include a shebang header in your scripts to point to the right path:</p>
<pre>#!/your/home/directory/bin/python</pre>
<p><a href="http://pepijndevos.nl/cgi-bin/python/webpy.cgi/blog-reader">Again, check the result!</a></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://pepijndevos.nl/2010/02/wordpress-com-stats-top-posts-widget/" title="Wordpress.com Stats: Top Posts Widget (February 22, 2010)">Wordpress.com Stats: Top Posts Widget</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2010/02/shorten-wordpress-urls-in-adium/" title="Shorten Wordpress urls in Adium (February 20, 2010)">Shorten Wordpress urls in Adium</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2009/08/nieuwe-website/" title="Nieuwe website (August 26, 2009)">Nieuwe website</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/03/install-python-on-shared-host/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to navigate the browser ballot screen</title>
		<link>http://pepijndevos.nl/2010/02/how-to-navigate-the-browser-ballot-screen/</link>
		<comments>http://pepijndevos.nl/2010/02/how-to-navigate-the-browser-ballot-screen/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 11:58:31 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[browser ballot]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[xkcd]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=251</guid>
		<description><![CDATA[
This is my response to the EU/Microsoft browser ballot screen. Honestly, most people don&#8217;t even know what their browser is, what do you think the difference in IE market share will be?
http://xkcd.com/627/ also applies here.
I recommend any of the five except IE. In case you&#8217;re wondering, I&#8217;m using Safari.

	Related posts
	
	No related posts.
	

]]></description>
			<content:encoded><![CDATA[<p><a href="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/browser-ballot.gif"><img class="aligncenter size-full wp-image-256" title="You should choose Opera of course..." src="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/browser-ballot.gif" alt="How to navigate the browser ballot." width="500" height="707" /></a></p>
<p>This is my response to the EU/Microsoft browser ballot screen. Honestly, most people don&#8217;t even know what their browser is, what do you think the difference in IE market share will be?</p>
<p><a href="http://xkcd.com/627/">http://xkcd.com/627/</a> also applies here.</p>
<p>I recommend any of the five except IE. In case you&#8217;re wondering, I&#8217;m using Safari.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li>No related posts.</li>
	</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/02/how-to-navigate-the-browser-ballot-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress.com Stats: Top Posts Widget</title>
		<link>http://pepijndevos.nl/2010/02/wordpress-com-stats-top-posts-widget/</link>
		<comments>http://pepijndevos.nl/2010/02/wordpress-com-stats-top-posts-widget/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 14:31:28 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=240</guid>
		<description><![CDATA[This hack is so cool and so simple, I expect anyone to run up to me and yell that this has been done before. I created a &#8216;Top Posts&#8217; sidebar widget based on the widget that comes with any Worpdpress.com blog.
I know there are several widgets like this, but they all include their own statistics [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/arrow.jpg"><img class="alignright size-full wp-image-241" title="arrow" src="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/arrow.jpg" alt="" width="100" height="100" /></a>This hack is so cool and so simple, I expect anyone to run up to me and yell that this has been done before. I created a &#8216;Top Posts&#8217; sidebar widget based on the widget that comes with any <a href="http://wordpress.com">Worpdpress.com</a> blog.</p>
<p>I know there are several widgets like this, but they all include their own statistics tracking. Mine is nothing more than an excerpt of the <em>Dashboard</em> widget that comes with the <a href="http://wordpress.org/extend/plugins/stats/">Wordpress.com Stats</a> plugin.</p>
<p>For people not interested in technical details, <a href="http://downloads.wordpress.org/plugin/wordpresscom-stats-top-posts-sidebar-widget.zip">here is a plugin file</a>, that works as usual; Make sure you install the <a href="http://wordpress.org/extend/plugins/stats/">Wordpress.com Stats</a> plugin first!</p>
<p>I said this hack was simple, here is way: The code is already there! I&#8217;m surprised Wordpress did not include the widget themselves. Lets have a look at stats.php:</p>
<p>Line 925-926:</p>
<pre>foreach ( $top_posts = stats_get_csv( 'postviews', "days=$options[top]$csv_args[top]" ) as $post )
	$post_ids[] = $post['post_id'];</pre>
<p>Line 942-949:</p>
<pre>&lt;?php foreach ( $top_posts as $post ) : if ( !get_post( $post['post_id'] ) ) continue; ?&gt;
&lt;p&gt;&lt;?php printf(
	$printf,
	'&lt;a href="' . get_permalink( $post['post_id'] ) . '"&gt;' . get_the_title( $post['post_id'] ) . '&lt;/a&gt;',
//			'&lt;a href="' . $post['post_permalink'] . '"&gt;' . $post['post_title'] . '&lt;/a&gt;',
	number_format_i18n( $post['views'] )
); ?&gt;&lt;/p&gt;
&lt;?php endforeach; ?&gt;</pre>
<p>My resulting guesswork looks like this:</p>
<pre>&lt;h4&gt;Top posts&lt;/h4&gt;
&lt;ul&gt;
&lt;?php foreach($top_posts = stats_get_csv('postviews', "days=7") as $post): if(!get_post($post['post_id'])) continue; ?&gt;
	&lt;li&gt;&lt;a href="&lt;?php echo $post['post_permalink']; ?&gt;"&gt;&lt;?php echo $post['post_title']; ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endforeach; ?&gt;</pre>
<p><del>If anyone is interested, I can upload this to the Wordpress plugin repository.</del><br />
<ins>Done: <a href="http://wordpress.org/extend/plugins/wordpresscom-stats-top-posts-sidebar-widget/">http://wordpress.org/extend/plugins/wordpresscom-stats-top-posts-sidebar-widget/</a><ins></ins></ins></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://pepijndevos.nl/2010/02/shorten-wordpress-urls-in-adium/" title="Shorten Wordpress urls in Adium (February 20, 2010)">Shorten Wordpress urls in Adium</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2009/08/nieuwe-website/" title="Nieuwe website (August 26, 2009)">Nieuwe website</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2010/03/install-python-on-shared-host/" title="How to install Python/web.py on a shared host (March 3, 2010)">How to install Python/web.py on a shared host</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/02/wordpress-com-stats-top-posts-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Food versus code</title>
		<link>http://pepijndevos.nl/2010/02/food-versus-code/</link>
		<comments>http://pepijndevos.nl/2010/02/food-versus-code/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 11:22:43 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Regular expression]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=233</guid>
		<description><![CDATA[Food: 279kJ/66kcal; E263, E181, E459;
Code: [a-zA-Z0-9]*; &#38;#104;&#38;#101;&#38;#121;
Now, which one is easier to decipher? Do you think we need simple food, simple code, or both?
For the record, the first food part is from coffee, the ingredients are Calcium acetate, Tannin and Beta-cyclodextrine. The first code part is a regex matching any number of alpha-numeric characters, the second part is [...]]]></description>
			<content:encoded><![CDATA[<pre>Food: 279kJ/66kcal; E263, E181, E459;
Code: [a-zA-Z0-9]*; &amp;#104;&amp;#101;&amp;#121;</pre>
<p>Now, which one is easier to decipher? Do you think we need simple food, simple code, or both?</p>
<p>For the record, the first food part is from coffee, the ingredients are Calcium acetate, Tannin and Beta-cyclodextrine. The first code part is a regex matching any number of alpha-numeric characters, the second part is &#8216;hey&#8217; in html entities.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://pepijndevos.nl/2010/02/write-clean-code/" title="Write clean code! (February 18, 2010)">Write clean code!</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2010/03/install-python-on-shared-host/" title="How to install Python/web.py on a shared host (March 3, 2010)">How to install Python/web.py on a shared host</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/02/food-versus-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shorten Wordpress urls in Adium</title>
		<link>http://pepijndevos.nl/2010/02/shorten-wordpress-urls-in-adium/</link>
		<comments>http://pepijndevos.nl/2010/02/shorten-wordpress-urls-in-adium/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 20:50:03 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Adium]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=220</guid>
		<description><![CDATA[I use Adium as my Twitter client, it includes a nice url shortener supporting multiple services, so what is my problem?
Nothing, I just had some fun making use of the wp.me service. Every Wordpress blog contains a header containing the short url, so it was only 3 lines of Applescript and one line of Bash [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://adium.im/">Adium</a> as my Twitter client, it includes a nice url shortener supporting multiple services, so what is my problem?</p>
<p>Nothing, I just had some fun making use of the <a href="http://en.blog.wordpress.com/2009/08/14/shorten/">wp.me</a> service. Every Wordpress blog contains a header containing the short url, so it was only 3 lines of Applescript and one line of Bash to get the short url of any wp blog and post it to Adium.</p>
<p>If anyone with knowlegde of regex/grep comes around, he might get it to work with any shorturl/shortlink header.</p>
<p style="text-align: center;"><a href="http://xkcd.com/208/"><img class="alignnone size-full wp-image-226" title="regular_expressions" src="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/regular_expressions.png" alt="" width="252" height="197" /></a></p>
<p style="text-align: center;">
<p>The current line looks like this:</p>
<pre>curl --head <strong>&lt;url&gt;</strong> -s | grep -o http://wp\.me/[a-zA-Z0-9\-]*</pre>
<p><strong>Update:</strong> sed seems to be able to do what I want.</p>
<pre>curl --head http://pepijndevos.nl/ -s | \
sed -n 's/Link: &lt;\(.*\)&gt;; rel=shortlink/\1/p'</pre>
<p>Use:</p>
<pre>%_shorten{<strong>&lt;url</strong>&gt;}</pre>
<p>Download the script: <a href="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/shorten.AdiumScripts.zip">shorten.AdiumScripts</a></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://pepijndevos.nl/2010/02/wordpress-com-stats-top-posts-widget/" title="Wordpress.com Stats: Top Posts Widget (February 22, 2010)">Wordpress.com Stats: Top Posts Widget</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2009/08/nieuwe-website/" title="Nieuwe website (August 26, 2009)">Nieuwe website</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2010/03/install-python-on-shared-host/" title="How to install Python/web.py on a shared host (March 3, 2010)">How to install Python/web.py on a shared host</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/02/shorten-wordpress-urls-in-adium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-domain caching</title>
		<link>http://pepijndevos.nl/2010/02/cross-domain-caching/</link>
		<comments>http://pepijndevos.nl/2010/02/cross-domain-caching/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 10:21:06 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Hypertext Transfer Protocol]]></category>
		<category><![CDATA[List of HTTP headers]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=210</guid>
		<description><![CDATA[Looking at the list of HTTP headers at Wikipedia, you&#8217;ll notice a few headers like If-Modified-Since, that serve to send content over only if it has changed since the last request.
While working with JavaScrip frameworks like jQuery, the thought occurred to me, that maybe half of all the websites I open are using the exact [...]]]></description>
			<content:encoded><![CDATA[<p>Looking at the <a href="http://en.wikipedia.org/wiki/List_of_HTTP_headers">list of HTTP headers at Wikipedia</a>, you&#8217;ll notice a few headers like If-Modified-Since, that serve to send content over only if it has changed since the last request.</p>
<p>While working with JavaScrip frameworks like <a class="zem_slink" title="JQuery" rel="homepage" href="http://jquery.com/">jQuery</a>, the thought occurred to me, that maybe half of all the websites I open are using the exact same JS framework, isn&#8217;t that a waste of bandwidth?</p>
<p>The best real-life solution would be to get your JS from Google, so you at least share a cached version with others that do the same: <a href="http://code.google.com/apis/ajaxlibs/">http://code.google.com/apis/ajaxlibs/</a></p>
<p>My imaginary solution however, would allow the same file, served from different hosts to be cached only once.</p>
<p>Look again at the list of headers&#8230; We&#8217;re looking for something to identify files as equal&#8230; What about Content-MD5? It exists, right there! But as far as I can tell it&#8217;s used for content-verification only.</p>
<p>So I want to propose a new HTTP header: If-MD5-Differs</p>
<p>What do you think about it? Cool? Useless? Security issues?</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li>No related posts.</li>
	</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/02/cross-domain-caching/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Automatically remove Trash from usb sticks</title>
		<link>http://pepijndevos.nl/2010/02/automatically-remove-trash-from-usb-sticks/</link>
		<comments>http://pepijndevos.nl/2010/02/automatically-remove-trash-from-usb-sticks/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 13:35:54 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[File Management]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[USB flash drive]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=202</guid>
		<description><![CDATA[I think most Mac users have had this problem; You delete a bunch of files from your pen drive to make room for a large file, and it keeps complaining about lack of space.
The problem is that when you remove files on Mac, they&#8217;re just moved to a hidden folder named &#8216;.Trashes&#8217;, so they are [...]]]></description>
			<content:encoded><![CDATA[<p>I think most Mac users have had this problem; You delete a bunch of files from your pen drive to make room for a large file, and it keeps complaining about lack of space.</p>
<p>The problem is that when you remove files on Mac, they&#8217;re just moved to a hidden folder named &#8216;.Trashes&#8217;, so they are actually still there. A commonly suggested solution is to empty the Trash while the USB stick is plugged in, but this might be problematic in some cases where you want to keep your Trash, just in case&#8230;</p>
<p style="text-align: center;"><a href="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.52.02-PM.png"><img class="alignnone size-full wp-image-206" title=".Trashes and Volumes folders" src="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.52.02-PM.png" alt="" width="220" height="101" /></a></p>
<p>My new solution is to set this little script as a folder action, it will remove the trash <strong>only</strong> from the USB stick as soon as you mount it(unmount proved problematic).</p>
<pre>on adding folder items to this_folder after receiving these_items
    do shell script "rm -rf " &amp; POSIX path of these_items &amp; ".Trashes/"
end adding folder items to</pre>
<p>Save this script to /Library/Scripts/Folder Action Scripts/ and now set it as the folder action for /Volumes.</p>
<p><a href="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.32.17-PM.png"><img class="alignnone size-full wp-image-203" title="Folder action of /Volumes" src="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.32.17-PM.png" alt="" width="493" height="296" /></a></p>
<p>You might need to show hidden files in Finder for /Volumes to be visible. To do this, follow <a href="http://lifehacker.com/188892/show-hidden-files-in-finder">this guide</a>.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://pepijndevos.nl/2010/02/shorten-wordpress-urls-in-adium/" title="Shorten Wordpress urls in Adium (February 20, 2010)">Shorten Wordpress urls in Adium</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/02/automatically-remove-trash-from-usb-sticks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write clean code!</title>
		<link>http://pepijndevos.nl/2010/02/write-clean-code/</link>
		<comments>http://pepijndevos.nl/2010/02/write-clean-code/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 14:38:58 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=188</guid>
		<description><![CDATA[

	Related posts
	
	Food versus code (0)


]]></description>
			<content:encoded><![CDATA[<p><a href="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/abduction.jpg"><img class="alignnone size-full wp-image-189" title="I wonder how their brain works, lets abduct them and find out!" src="http://pepijndevos.nl/subpress/wp-content/uploads/2010/02/abduction.jpg" alt="" width="540" height="777" /></a></p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://pepijndevos.nl/2010/02/food-versus-code/" title="Food versus code (February 21, 2010)">Food versus code</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2010/02/write-clean-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nieuwe website</title>
		<link>http://pepijndevos.nl/2009/08/nieuwe-website/</link>
		<comments>http://pepijndevos.nl/2009/08/nieuwe-website/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 13:34:50 +0000</pubDate>
		<dc:creator>Pepijn de Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://pepijndevos.nl/?p=3</guid>
		<description><![CDATA[Hehe, eindelijk, ik heb een eigen website opgezet! Ik had al een tijdje een wordpress.com blog, maar nu heb ik een website waar ik wel alles me kan doen wat ik wil.

	Related posts
	
	Wordpress.com Stats: Top Posts Widget (0)
	Shorten Wordpress urls in Adium (0)
	How to install Python/web.py on a shared host (1)


]]></description>
			<content:encoded><![CDATA[<p>Hehe, eindelijk, ik heb een eigen website opgezet! Ik had al een tijdje een <a href="http://metapep.wordpress.com">wordpress.com</a> blog, maar nu heb ik een website waar ik <em>wel</em> alles me kan doen wat ik wil.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://pepijndevos.nl/2010/02/wordpress-com-stats-top-posts-widget/" title="Wordpress.com Stats: Top Posts Widget (February 22, 2010)">Wordpress.com Stats: Top Posts Widget</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2010/02/shorten-wordpress-urls-in-adium/" title="Shorten Wordpress urls in Adium (February 20, 2010)">Shorten Wordpress urls in Adium</a> (0)</li>
	<li><a href="http://pepijndevos.nl/2010/03/install-python-on-shared-host/" title="How to install Python/web.py on a shared host (March 3, 2010)">How to install Python/web.py on a shared host</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://pepijndevos.nl/2009/08/nieuwe-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
