<?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>hacksocke.de</title>
	<atom:link href="http://www.hacksocke.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hacksocke.de</link>
	<description>Minced Meat</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:50:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Rails&#8217; symbols for HTTP status codes</title>
		<link>http://www.hacksocke.de/2011/11/17/rails-symbols-for-http-status-codes/</link>
		<comments>http://www.hacksocke.de/2011/11/17/rails-symbols-for-http-status-codes/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 08:55:40 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/?p=124</guid>
		<description><![CDATA[This is more of a personal reference than anything ground-breaking. I found this in a comment to the render method on ApiDock. Some pretty bad wording there, anyone with a who &#124; grep -i blonde &#124; date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep like comment? 100 = :continue 101 [...]]]></description>
			<content:encoded><![CDATA[<p>This is more of a personal reference than anything ground-breaking. I found this in a <a href="http://apidock.com/rails/v2.3.8/ActionController/Base/render#254-List-of-status-codes-and-their-symbols">comment to the render method on ApiDock</a>. Some pretty bad wording there, anyone with a <code> who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep</code> like comment? <img src='http://www.hacksocke.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<span id="more-124"></span></p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006666;">100</span> = <span style="color:#ff3333; font-weight:bold;">:continue</span>
<span style="color:#006666;">101</span> = <span style="color:#ff3333; font-weight:bold;">:switching_protocols</span>
<span style="color:#006666;">102</span> = <span style="color:#ff3333; font-weight:bold;">:processing</span>
<span style="color:#006666;">200</span> = <span style="color:#ff3333; font-weight:bold;">:ok</span>
<span style="color:#006666;">201</span> = <span style="color:#ff3333; font-weight:bold;">:created</span>
<span style="color:#006666;">202</span> = <span style="color:#ff3333; font-weight:bold;">:accepted</span>
<span style="color:#006666;">203</span> = <span style="color:#ff3333; font-weight:bold;">:non_authoritative_information</span>
<span style="color:#006666;">204</span> = <span style="color:#ff3333; font-weight:bold;">:no_content</span>
<span style="color:#006666;">205</span> = <span style="color:#ff3333; font-weight:bold;">:reset_content</span>
<span style="color:#006666;">206</span> = <span style="color:#ff3333; font-weight:bold;">:partial_content</span>
<span style="color:#006666;">207</span> = <span style="color:#ff3333; font-weight:bold;">:multi_status</span>
<span style="color:#006666;">226</span> = <span style="color:#ff3333; font-weight:bold;">:im_used</span>
<span style="color:#006666;">300</span> = <span style="color:#ff3333; font-weight:bold;">:multiple_choices</span>
<span style="color:#006666;">301</span> = <span style="color:#ff3333; font-weight:bold;">:moved_permanently</span>
<span style="color:#006666;">302</span> = <span style="color:#ff3333; font-weight:bold;">:found</span>
<span style="color:#006666;">303</span> = <span style="color:#ff3333; font-weight:bold;">:see_other</span>
<span style="color:#006666;">304</span> = <span style="color:#ff3333; font-weight:bold;">:not_modified</span>
<span style="color:#006666;">305</span> = <span style="color:#ff3333; font-weight:bold;">:use_proxy</span>
<span style="color:#006666;">307</span> = <span style="color:#ff3333; font-weight:bold;">:temporary_redirect</span>
<span style="color:#006666;">400</span> = <span style="color:#ff3333; font-weight:bold;">:bad_request</span>
<span style="color:#006666;">401</span> = <span style="color:#ff3333; font-weight:bold;">:unauthorized</span>
<span style="color:#006666;">402</span> = <span style="color:#ff3333; font-weight:bold;">:payment_required</span>
<span style="color:#006666;">403</span> = <span style="color:#ff3333; font-weight:bold;">:forbidden</span>
<span style="color:#006666;">404</span> = <span style="color:#ff3333; font-weight:bold;">:not_found</span>
<span style="color:#006666;">405</span> = <span style="color:#ff3333; font-weight:bold;">:method_not_allowed</span>
<span style="color:#006666;">406</span> = <span style="color:#ff3333; font-weight:bold;">:not_acceptable</span>
<span style="color:#006666;">407</span> = <span style="color:#ff3333; font-weight:bold;">:proxy_authentication_required</span>
<span style="color:#006666;">408</span> = <span style="color:#ff3333; font-weight:bold;">:request_timeout</span>
<span style="color:#006666;">409</span> = <span style="color:#ff3333; font-weight:bold;">:conflict</span>
<span style="color:#006666;">410</span> = <span style="color:#ff3333; font-weight:bold;">:gone</span>
<span style="color:#006666;">411</span> = <span style="color:#ff3333; font-weight:bold;">:length_required</span>
<span style="color:#006666;">412</span> = <span style="color:#ff3333; font-weight:bold;">:precondition_failed</span>
<span style="color:#006666;">413</span> = <span style="color:#ff3333; font-weight:bold;">:request_entity_too_large</span>
<span style="color:#006666;">414</span> = <span style="color:#ff3333; font-weight:bold;">:request_uri_too_long</span>
<span style="color:#006666;">415</span> = <span style="color:#ff3333; font-weight:bold;">:unsupported_media_type</span>
<span style="color:#006666;">416</span> = <span style="color:#ff3333; font-weight:bold;">:requested_range_not_satisfiable</span>
<span style="color:#006666;">417</span> = <span style="color:#ff3333; font-weight:bold;">:expectation_failed</span>
<span style="color:#006666;">422</span> = <span style="color:#ff3333; font-weight:bold;">:unprocessable_entity</span>
<span style="color:#006666;">423</span> = <span style="color:#ff3333; font-weight:bold;">:locked</span>
<span style="color:#006666;">424</span> = <span style="color:#ff3333; font-weight:bold;">:failed_dependency</span>
<span style="color:#006666;">426</span> = <span style="color:#ff3333; font-weight:bold;">:upgrade_required</span>
<span style="color:#006666;">500</span> = <span style="color:#ff3333; font-weight:bold;">:internal_server_error</span>
<span style="color:#006666;">501</span> = <span style="color:#ff3333; font-weight:bold;">:not_implemented</span>
<span style="color:#006666;">502</span> = <span style="color:#ff3333; font-weight:bold;">:bad_gateway</span>
<span style="color:#006666;">503</span> = <span style="color:#ff3333; font-weight:bold;">:service_unavailable</span>
<span style="color:#006666;">504</span> = <span style="color:#ff3333; font-weight:bold;">:gateway_timeout</span>
<span style="color:#006666;">505</span> = <span style="color:#ff3333; font-weight:bold;">:http_version_not_supported</span>
<span style="color:#006666;">507</span> = <span style="color:#ff3333; font-weight:bold;">:insufficient_storage</span>
<span style="color:#006666;">510</span> = <span style="color:#ff3333; font-weight:bold;">:not_extended</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2011/11/17/rails-symbols-for-http-status-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vivaldi&#8217;s Four Seasons for free?</title>
		<link>http://www.hacksocke.de/2011/11/11/vivaldis-four-seasons-for-free/</link>
		<comments>http://www.hacksocke.de/2011/11/11/vivaldis-four-seasons-for-free/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 00:27:35 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/?p=107</guid>
		<description><![CDATA[I was surprised to see the wikipedia page for Vivaldi&#8217;s Four Seasons to have freely available Ogg/Vorbis files. I know I could have downloaded them all manually, yes. However, I thought it to be a good evening sport to write a small script that downloads it for me and converts the OGG files (not much [...]]]></description>
			<content:encoded><![CDATA[<p>I was surprised to see the <a href="http://en.wikipedia.org/wiki/The_Four_Seasons_%28Vivaldi%29">wikipedia page for Vivaldi&#8217;s Four Seasons</a> to have freely available Ogg/Vorbis files. I know I could have downloaded them all manually, yes. However, I thought it to be a good evening sport to write a small script that downloads it for me and converts the OGG files (not much liked by iTunes) into MP3 (it also sets ID3-tags with a bit of awk-magic).<br />
The result can be found below (or <a href="/vampire/vivaldi.rb">download the script directly</a>). It requires the rubygem <a href="https://github.com/tenderlove/nokogiri">Nokogiri</a> and expects the command line tools ogg123, vorbiscomment (both available in a packaged named &#8220;vorbis-tools&#8221; on Macports) and lame (MP3 encoder) to be installed in your $PATH.</p>
<p>Obligatory legal stuff: the file comes “as is” with no warranty whatsoever. The downloaded files are from John Harrison and licensed under the Creative Commons <a href="http://creativecommons.org/licenses/by-sa/1.0/deed.en">Attribution-Share-Alike Generic 1.0 License</a>. The script itself is hereby released as <a href="http://de.wikipedia.org/wiki/Beerware">beer-ware</a>.</p>
<p>The script is brittle: if Wikipedia decides to change their link styles, all hell breaks loose. It may or may not work for you &#8211; YMMV. But here goes:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'open-uri'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'nokogiri'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'net/http'</span>
&nbsp;
user_agent = <span style="color:#996600;">&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1&quot;</span>
url = <span style="color:#996600;">&quot;http://en.wikipedia.org/wiki/The_Four_Seasons_%28Vivaldi%29&quot;</span>
fourseasonspage = <span style="color:#6666ff; font-weight:bold;">Nokogiri::HTML</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>url, <span style="color:#996600;">&quot;User-Agent&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> user_agent<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#0066ff; font-weight:bold;">@destdir</span> = ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'DESTDIR'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">||</span> <span style="color:#996600;">'vivaldi'</span>
<span style="color:#CC00FF; font-weight:bold;">FileUtils</span>.<span style="color:#9900CC;">mkdir_p</span><span style="color:#006600; font-weight:bold;">&#40;</span>@destdir<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>@destdir<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#0066ff; font-weight:bold;">@uri</span> = <span style="color:#CC00FF; font-weight:bold;">URI</span>.<span style="color:#9900CC;">parse</span><span style="color:#006600; font-weight:bold;">&#40;</span>url<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Aquiring the Four Seasons</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1mGetting Files...<span style="color:#000099;">\e</span>[0m&quot;</span>
<span style="color:#CC0066; font-weight:bold;">puts</span>
&nbsp;
fourseasonspage.<span style="color:#9900CC;">css</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;div.medialist a&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>ogg_link<span style="color:#006600; font-weight:bold;">|</span>
  url = <span style="color:#996600;">&quot;http://&quot;</span><span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@uri</span>.<span style="color:#9900CC;">host</span> <span style="color:#006600; font-weight:bold;">+</span> ogg_link<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:href</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  ogg_page = <span style="color:#6666ff; font-weight:bold;">Nokogiri::HTML</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>url, <span style="color:#996600;">&quot;User-Agent&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> user_agent<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  ogg_page.<span style="color:#9900CC;">css</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;div.fullMedia a.internal&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>link<span style="color:#006600; font-weight:bold;">|</span>
      <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Downloading: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> link<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:href</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      filename = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span>link<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:href</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      uri = <span style="color:#CC00FF; font-weight:bold;">URI</span>.<span style="color:#9900CC;">parse</span><span style="color:#006600; font-weight:bold;">&#40;</span>link<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:href</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#6666ff; font-weight:bold;">Net::HTTP</span>.<span style="color:#9900CC;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span>uri.<span style="color:#9900CC;">host</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>http<span style="color:#006600; font-weight:bold;">|</span>
        resp = http.<span style="color:#9900CC;">get</span><span style="color:#006600; font-weight:bold;">&#40;</span>uri.<span style="color:#9900CC;">path</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span>@destdir, filename<span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#996600;">&quot;wb&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>file<span style="color:#006600; font-weight:bold;">|</span>
          file.<span style="color:#9900CC;">write</span><span style="color:#006600; font-weight:bold;">&#40;</span>resp.<span style="color:#9900CC;">body</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#006600; font-weight:bold;">/</span><span style="color:#CC00FF; font-weight:bold;">File</span>:<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span>ogg_link<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:href</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Now comes cmd line file converting</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1mStarting conversion...<span style="color:#000099;">\e</span>[0m&quot;</span>
<span style="color:#CC0066; font-weight:bold;">puts</span>
&nbsp;
<span style="color:#996600;">`for file in #{@destdir}/*.ogg ; do <span style="color:#000099;">\</span>
  echo &gt; id3.tag; <span style="color:#000099;">\</span>
  vorbiscomment -l -e $file |awk -F= '{print $1&quot;=&quot;&quot;'<span style="color:#000099;">\'</span>'&quot; $2 &quot;'<span style="color:#000099;">\'</span>'&quot; }' &gt; id3.tag ; <span style="color:#000099;">\</span>
  source id3.tag; <span style="color:#000099;">\</span>
  ogg123 -d wav -f - $file <span style="color:#000099;">\</span>
  | lame -h -v -m s -b 192 --tt &quot;$title&quot; --tn &quot;$tracknumber&quot; --ta &quot;$artist&quot; --tg &quot;$genre&quot; --tc &quot;$comment&quot; --tl &quot;$album&quot; --id3v2-only - #{@destdir}/$(basename &quot;$file&quot; .ogg).mp3; <span style="color:#000099;">\</span>
done; rm id3.tag`</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;<span style="color:#000099;">\e</span>[1mAll done.<span style="color:#000099;">\e</span>[0m&quot;</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;(You may wish to delete #{@destdir}/*.ogg)&quot;</span></pre></div></div>

<p>Getting started:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DESTDIR</span>=path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span> ruby vivaldi.rb</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2011/11/11/vivaldis-four-seasons-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>assert_select from string</title>
		<link>http://www.hacksocke.de/2011/04/20/assert_select-from-string/</link>
		<comments>http://www.hacksocke.de/2011/04/20/assert_select-from-string/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 12:46:25 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/?p=77</guid>
		<description><![CDATA[ActionController::TestCase provides assert_select to check for specific contents of views in a Rails project. It&#8217;s also a nice way to test view helpers with somewhat more complex HTML output (ie. nested nodes by multiple calls to content_tag). There is a nice and short article by Erik Ostrom that explains how to do that without the [...]]]></description>
			<content:encoded><![CDATA[<p><code>ActionController::TestCase</code> provides <code>assert_select</code> to check for specific contents of views in a Rails project. It&#8217;s also a nice way to test view helpers with somewhat more complex HTML output (ie. nested nodes by multiple calls to <code>content_tag</code>).</p>
<p>There is a <a href="http://www.echographia.com/blog/2009/08/22/assert_select-from-arbitrary-text/">nice and short article by Erik Ostrom</a> that explains how to do that without the response object you&#8217;ll normally have when using it to check views. However, it lacked support for nested nodes which can be remedied by adding <code>yield @selected if block_given?</code>.</p>
<p>The modified code snippet to put in <code>test/test_helper.rb</code> is:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#6666ff; font-weight:bold;">ActiveSupport::TestCase</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> assert_select_from<span style="color:#006600; font-weight:bold;">&#40;</span>text, <span style="color:#006600; font-weight:bold;">*</span>args<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@selected</span> = <span style="color:#6666ff; font-weight:bold;">HTML::Document</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>text<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">root</span>.<span style="color:#9900CC;">children</span>
    assert_select<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>args<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">yield</span> <span style="color:#0066ff; font-weight:bold;">@selected</span> <span style="color:#9966CC; font-weight:bold;">if</span> block_given?
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Usage:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> test_hreview_aggregate_item
  output = hreview_aggregate<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:fn</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">&quot;John Doe's Pawn Shop&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  assert_select_from output, <span style="color:#996600;">&quot;span.hreview-aggregate&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    assert_select <span style="color:#996600;">&quot;span.item&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      <span style="color:#008000; font-style:italic;"># nb: it's assert_select within the block</span>
      assert_select <span style="color:#996600;">&quot;span.fn&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:text</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">&quot;John Doe's Pawn Shop&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2011/04/20/assert_select-from-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HAProxy, X-HTTP-Forwarded-For, Rails and exposed exceptions</title>
		<link>http://www.hacksocke.de/2011/04/01/haproxy-x-http-forwarded-for-rails-and-exposed-exceptions/</link>
		<comments>http://www.hacksocke.de/2011/04/01/haproxy-x-http-forwarded-for-rails-and-exposed-exceptions/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 15:23:26 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/?p=61</guid>
		<description><![CDATA[(A german version is available at the kaupert media gmbh website) We use HAProxy as the frontend to forward incoming requests to Apache+Passenger instances on our webservers at berlin.kauperts.de. Problems arose on the HAProxy machine itself which was also (intentionally) forwarding requests to a locally running Apache: despite using the forward_for option for the configured [...]]]></description>
			<content:encoded><![CDATA[<p><small>(A german version is available at the <a href="http://www.kaupertmedia.de/devblog-haproxy-rails-und-freiliegende-fehlermeldungen">kaupert media gmbh</a> website)</small></p>
<p>We use <a href="http://haproxy.1wt.eu/">HAProxy</a> as the frontend to forward incoming requests to Apache+Passenger instances on our webservers at <a href="http://berlin.kauperts.de">berlin.kauperts.de</a>.</p>
<p>Problems arose on the HAProxy machine itself which was also (intentionally) forwarding requests to a locally running Apache: despite using the <code>forward_for</code> option for the configured backend, Rails considered all incoming requests local as they were indeed coming from the local machine. The result was exposed exceptions, even on something as trivial as RoutingError which should trigger a normal 404.</p>
<p>Wesley Moxam described this problem in a <a href="http://blog.viarails.net/2008/7/22/nginx-haproxy-gotcha">blog post</a>, but our setup is slightly different: HAProxy sends requests directly to Passenger/mod_rails within Apache vhosts without Apache-side (double)proxying involved. Removing the option forwardfor as described in said post was no viable way to go for us as it confused the non-local nodes in the setup.</p>
<p>Additionally, the Rails applications on each node behind HAProxy would never get the true client&#8217;s IP address: <code><a href="http://apidock.com/rails/v2.3.8/ActionController/Request/remote_ip">Request#remote_ip</a></code> was always that of the HAProxy instance.</p>
<p>Heaving the formally locally running instance onto the external interface and treating it just as any other node rid us of the first problem and adding your HAProxy to the list of <code>TRUSTED_PROXIES</code> fixes the second. Add the following line as an initializer to your Rails 2.3.x app. The HAProxy backend uses <code>option httpclose</code> and <code>option forward_for</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># config/initializers/trusted_proxies.rb</span>
<span style="color:#008000; font-style:italic;"># If your HAProxy is running at 209.85.149.104, set:</span>
<span style="color:#6666ff; font-weight:bold;">ActionController::Request</span>.<span style="color:#9900CC;">const_set</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;TRUSTED_PROXIES&quot;</span>, <span style="color:#006600; font-weight:bold;">/</span>^<span style="color:#006666;">209</span>\.85\.149\.104$<span style="color:#006600; font-weight:bold;">|</span>^<span style="color:#006666;">127</span>\.0\.0\.1$<span style="color:#006600; font-weight:bold;">|</span>^<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span><span style="color:#006600; font-weight:bold;">|</span><span style="color:#006666;">172</span>\.<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">6</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">|</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">|</span><span style="color:#006666;">30</span><span style="color:#006600; font-weight:bold;">|</span><span style="color:#006666;">31</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">|</span><span style="color:#006666;">192</span>\.168<span style="color:#006600; font-weight:bold;">&#41;</span>\.<span style="color:#006600; font-weight:bold;">/</span>i<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Granted, I don&#8217;t feel overly comfortable with coding that bit of network architecture into my Rails application. Moving servers and switching IPs is pain enough as it stands and thus I don&#8217;t like adding another dependency. It works, though, and here&#8217;s to hoping that our loadbalancer does not have to be exchanged anytime soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2011/04/01/haproxy-x-http-forwarded-for-rails-and-exposed-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>amatch gem on Ubuntu 10.4 x64_86</title>
		<link>http://www.hacksocke.de/2010/10/26/amatch-gem-on-ubuntu-104-x64_86/</link>
		<comments>http://www.hacksocke.de/2010/10/26/amatch-gem-on-ubuntu-104-x64_86/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 11:48:33 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/2010/10/26/amatch-gem-on-ubuntu-104-x64_86/</guid>
		<description><![CDATA[Setting up a new server, I&#8217;ve run into another gem building problem (similar to a problem with the mysql gem on a Centos 5.2 system a while back). The amatch gem fails to build its native part on a 64bit Ubuntu, terminating with: /var/lib/gems/1.8/gems/amatch-0.2.5/lib/amatch.so: wrong ELF class: ELFCLASS32 - /var/lib/gems/1.8/gems/amatch-0.2.5/lib/amatch.so As the &#8220;ELFCLASS32&#8243; bit in [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up a new server, I&#8217;ve run into another gem building problem (similar to a problem with the <a href="http://www.hacksocke.de/2009/03/04/gem-mysql-27-on-centos-52-x86_64/">mysql gem on a Centos 5.2 system</a> a while back). The amatch gem fails to build its native part on a 64bit Ubuntu, terminating with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>amatch-0.2.5<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>amatch.so: wrong ELF class: ELFCLASS32 - <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>amatch-0.2.5<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>amatch.so</pre></div></div>

<p>As the &#8220;ELFCLASS32&#8243; bit in the error message suggests, it&#8217;s an architecture issue:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>amatch-0.2.5<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>amatch.so
<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>amatch-0.2.5<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>amatch.so: ELF <span style="color: #000000;">32</span>-bit LSB shared object, Intel <span style="color: #000000;">80386</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, dynamically linked, not stripped</pre></div></div>

<p>It can be remedied easily by supplying the target arch like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #007800;">ARCHFLAGS</span>=<span style="color: #ff0000;">&quot;-arch x86_64&quot;</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> amatch</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2010/10/26/amatch-gem-on-ubuntu-104-x64_86/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing AR Sitemapper, a plugin for Ruby on Rails</title>
		<link>http://www.hacksocke.de/2010/07/17/activerecord-sitemapper-for-rails/</link>
		<comments>http://www.hacksocke.de/2010/07/17/activerecord-sitemapper-for-rails/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 09:04:51 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/2010/07/17/introducting-activerecord-sitemapper/</guid>
		<description><![CDATA[I have just published a Rails plugin to conveniently build XML sitemaps directly from an ActiveRecord model. It aims to be flexible and as low-level as possible. To add it to your Rails project, type: $ ruby script/plugin install git://github.com/carpodaster/ar_sitemapper.git A simple usage example to create a gzip&#8217;ed xml sitemap for a fictious model &#8220;Post&#8221;: [...]]]></description>
			<content:encoded><![CDATA[<p>I have just published a Rails plugin to conveniently build XML sitemaps directly from an ActiveRecord model. It aims to be flexible and as low-level as possible. To add it to your Rails project, type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ ruby script<span style="color: #000000; font-weight: bold;">/</span>plugin <span style="color: #c20cb9; font-weight: bold;">install</span> git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>carpodaster<span style="color: #000000; font-weight: bold;">/</span>ar_sitemapper.git</pre></div></div>

<p>A simple usage example to create a gzip&#8217;ed xml sitemap for a fictious model &#8220;Post&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Post.<span style="color:#9900CC;">build_sitemap</span> <span style="color:#ff3333; font-weight:bold;">:all</span>, <span style="color:#ff3333; font-weight:bold;">:filename</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;sitemap_posts.xml.gz&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>post, xml<span style="color:#006600; font-weight:bold;">|</span>
Â  xml.<span style="color:#9900CC;">loc</span> post_url<span style="color:#006600; font-weight:bold;">&#40;</span>post<span style="color:#006600; font-weight:bold;">&#41;</span>
Â  xml.<span style="color:#9900CC;">changefreq</span> <span style="color:#996600;">'weekly'</span>
Â  xml.<span style="color:#9900CC;">lastmod</span> content.<span style="color:#9900CC;">updated_at</span>
Â  xml.<span style="color:#9900CC;">priority</span> <span style="color:#006666;">0.5</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>For a more detailed description, see the <a href="http://github.com/carpodaster/ar_sitemapper#readme" title="warp to the plugin's readme file">Readme</a> on my <a href="http://github.com/carpodaster/ar_sitemapper">project page on GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2010/07/17/activerecord-sitemapper-for-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Confirmed revisions for vestal_versions 1.0.x</title>
		<link>http://www.hacksocke.de/2010/05/05/confirmed-revisions-for-vestal_versions-10x/</link>
		<comments>http://www.hacksocke.de/2010/05/05/confirmed-revisions-for-vestal_versions-10x/#comments</comments>
		<pubDate>Wed, 05 May 2010 11:23:37 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/2010/05/05/confirmed-revisions-for-vestal_versions-10x/</guid>
		<description><![CDATA[Laserlemon&#8217;s vestal_versions gem brought a few nice additions in its recent update to 1.0.x, most prominent for me was the ability to track user data (either a simple string or a reference to an arbitrary user object). I&#8217;m always keen to add even more QM measures to the main application I am working on at [...]]]></description>
			<content:encoded><![CDATA[<p>Laserlemon&#8217;s <a href="http://github.com/laserlemon/vestal_versions">vestal_versions</a> gem brought a few nice additions in its recent update to 1.0.x, most prominent for me was the ability to track user data (either a simple string or a reference to an arbitrary user object). I&#8217;m always keen to add even more QM measures to the <a href="http://berlin.kauperts.de">main application</a> I am working on at the moment. And since I was using vestal_versions for quite some time already, enhancing the already rich features seemed the more logical approach in contrast to reinvent the wheel (and basically storing the same data twice). I wanted to let versions be confirmable by other to integrate into the role-model of our editorial backoffice.</p>
<h3>Preparation</h3>
<p>Since I am too lazy to properly fork vestal_versions (might do that at some point in time though), here is a bit of code that adds the desired feature as a monkey patch (ie. without touching the gem itself):</p>
<p>First and foremost, we need to migrate the existing versions table (yes, I knowâ€¦ a tad bit ugly, but the migration will do you no harm)</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">up</span>
    change_table <span style="color:#ff3333; font-weight:bold;">:versions</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>t<span style="color:#006600; font-weight:bold;">|</span>
      t.<span style="color:#9900CC;">integer</span>  <span style="color:#ff3333; font-weight:bold;">:confirmer_id</span>
      t.<span style="color:#9900CC;">string</span>   <span style="color:#ff3333; font-weight:bold;">:confirmer_type</span>
      t.<span style="color:#9900CC;">datetime</span> <span style="color:#ff3333; font-weight:bold;">:confirmed_at</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    add_index <span style="color:#ff3333; font-weight:bold;">:versions</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:confirmer_id</span>, <span style="color:#ff3333; font-weight:bold;">:confirmer_type</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">down</span>
    remove_column <span style="color:#ff3333; font-weight:bold;">:versions</span>, <span style="color:#ff3333; font-weight:bold;">:confirmer_id</span>
    remove_column <span style="color:#ff3333; font-weight:bold;">:versions</span>, <span style="color:#ff3333; font-weight:bold;">:confirmer_type</span>
    remove_column <span style="color:#ff3333; font-weight:bold;">:versions</span>, <span style="color:#ff3333; font-weight:bold;">:confirmed_at</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Next, the monkey patch. Place this somewhere in your load path, <tt>./lib/kauperts/versions.rb</tt> worked for me. The module name is of course up to you.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># lib/kauperts/versions.rb</span>
<span style="color:#9966CC; font-weight:bold;">module</span> Kauperts <span style="color:#008000; font-style:italic;"># :nodoc:</span>
  <span style="color:#9966CC; font-weight:bold;">module</span> Versions <span style="color:#008000; font-style:italic;"># :nodoc:</span>
    <span style="color:#008000; font-style:italic;"># Custom extension of stock VestalVersions::Version to support a polymorphic</span>
    <span style="color:#008000; font-style:italic;"># reviewer object. Note: the versions table has to be modified for this.</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">included</span><span style="color:#006600; font-weight:bold;">&#40;</span>base<span style="color:#006600; font-weight:bold;">&#41;</span>
      base.<span style="color:#9900CC;">class_eval</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>klass<span style="color:#006600; font-weight:bold;">|</span>
        klass.<span style="color:#9900CC;">belongs_to</span> <span style="color:#ff3333; font-weight:bold;">:confirmer</span>, <span style="color:#ff3333; font-weight:bold;">:polymorphic</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#0000FF; font-weight:bold;">true</span>
        <span style="color:#9966CC; font-weight:bold;">def</span> confirmed?; !!<span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">confirmed_at</span>?; <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">def</span> confirm!
          <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">confirmed_at</span> = <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>
          <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">save</span>!
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>We also need the following line in an initializer or just at the bottom of your environment.rb (for some reason putting it outside the module definition above wouldn&#8217;t work for me, anyone got an idea why?)</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># In config/environment.rb</span>
<span style="color:#6666ff; font-weight:bold;">VestalVersions::Version</span>.<span style="color:#9900CC;">class_eval</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#6666ff; font-weight:bold;">Kauperts::Versions</span> <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<h3>Usage</h3>
<p>After you have migrated your database and restarted the application, you have a polymorphic <tt>belongs_to</tt> association <tt>confimer</tt> on your VestalVersion::Version model. A <tt>confim!</tt> method sets the <tt>confirmed_at</tt> attribute to Time.now and calls <tt>save!</tt> on itself. The method <tt>confirmed?</tt> returns true if the <tt>confirmed_at</tt> attribute is not <tt>nil</tt>.<br />
Setting the confirmer object is your controller&#8217;s duty. You may want to have a dedicated VersionsController to review/confirm past edits and access the recent versions directly (as opposed to the VersionedModel#versions association). I set up a confirm action:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># config/routes.rb</span>
    map.<span style="color:#9900CC;">resources</span> <span style="color:#ff3333; font-weight:bold;">:versions</span>, <span style="color:#ff3333; font-weight:bold;">:only</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:index</span>, <span style="color:#ff3333; font-weight:bold;">:show</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:member</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#006600; font-weight:bold;">&#123;</span>:confirm =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:put</span><span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># app/controllers/versions_controller.rb</span>
  <span style="color:#008000; font-style:italic;"># (CRUD actions)</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> confirm
    <span style="color:#008000; font-style:italic;"># change this to adapt to your role settings</span>
    <span style="color:#008000; font-style:italic;"># or shield this behind a before_filter.</span>
    <span style="color:#9966CC; font-weight:bold;">if</span> current_user.<span style="color:#9900CC;">editor</span>?
      current_object.<span style="color:#9900CC;">confirmer</span> = current_user
      current_object.<span style="color:#9900CC;">confirm</span>!
      <span style="color:#5A0A0A; font-weight:bold;">flash</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:notice</span><span style="color:#006600; font-weight:bold;">&#93;</span>  = <span style="color:#996600;">&quot;Version confirmed.&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">else</span>
      <span style="color:#5A0A0A; font-weight:bold;">flash</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:warning</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;Access denied.&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#5A0A0A; font-weight:bold;">redirect_to</span> version_path<span style="color:#006600; font-weight:bold;">&#40;</span>current_object<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<h3>Testing</h3>
<p>Naturally, I wrote tests. There doesn&#8217;t seem to be much potential for things to go wrong, but here you have it anyway (if only to prove that it&#8217;s working <img src='http://www.hacksocke.de/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  ):</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># test/unit/vestal_versions_extension_test.rb</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">'/../test_helper'</span>
<span style="color:#9966CC; font-weight:bold;">class</span> VestalVersionsExtensionTest <span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">ActiveSupport::TestCase</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> setup
    <span style="color:#008000; font-style:italic;"># Using factory_girl here to create and return an instance of</span>
    <span style="color:#008000; font-style:italic;"># ServiceProvider which is versioned with vestal_versions</span>
    <span style="color:#0066ff; font-weight:bold;">@versioned</span> = Factory<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:service_provider</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  test <span style="color:#996600;">&quot;should respond_to confirmed?&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    obj = Factory.<span style="color:#9900CC;">build</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:version</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert obj.<span style="color:#9900CC;">respond_to</span>? <span style="color:#ff3333; font-weight:bold;">:confirmed</span>?
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  test <span style="color:#996600;">&quot;should respond_to confirmer&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    obj = Factory.<span style="color:#9900CC;">build</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:version</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert obj.<span style="color:#9900CC;">respond_to</span>? <span style="color:#ff3333; font-weight:bold;">:confirmer</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  test <span style="color:#996600;">&quot;should set confirmed_at and confirm!&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#0066ff; font-weight:bold;">@versioned</span>.<span style="color:#9900CC;">update_attributes</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:name</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">&quot;Foo Bar #{rand}&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    obj = <span style="color:#0066ff; font-weight:bold;">@versioned</span>.<span style="color:#9900CC;">versions</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">last</span>
    assert obj.<span style="color:#9900CC;">respond_to</span>? <span style="color:#ff3333; font-weight:bold;">:confirm</span>!
    assert !obj.<span style="color:#9900CC;">confirmed</span>?
    obj.<span style="color:#9900CC;">confirm</span>!
    assert obj.<span style="color:#9900CC;">confirmed</span>?
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># test/functional/versions_controller_test.rb</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">'/../test_helper'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> VersionsControllerTest <span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">ActionController::TestCase</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> setup
    <span style="color:#008000; font-style:italic;"># A vanilla User is an unprivileged dude</span>
    <span style="color:#0066ff; font-weight:bold;">@user</span> = Factory<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:user</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    login_as_user<span style="color:#006600; font-weight:bold;">&#40;</span>@user<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@versioned</span> = Factory<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:service_provider</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  test <span style="color:#996600;">&quot;should not confirm as normal user&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    obj = Factory<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:version</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert !@user.<span style="color:#9900CC;">editor</span>?
    put <span style="color:#ff3333; font-weight:bold;">:confirm</span>, <span style="color:#ff3333; font-weight:bold;">:id</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; obj.<span style="color:#9900CC;">to_param</span>
    assert_response <span style="color:#ff3333; font-weight:bold;">:redirect</span>
    assert_redirected_to version_path<span style="color:#006600; font-weight:bold;">&#40;</span>obj<span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_not_nil flash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:warning</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    assert !assigns<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:current_object</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">confirmed</span>?
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  test <span style="color:#996600;">&quot;should confirm&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    obj = Factory<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:version</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@user</span>.<span style="color:#9900CC;">toggle</span>!<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:editor</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    put <span style="color:#ff3333; font-weight:bold;">:confirm</span>, <span style="color:#ff3333; font-weight:bold;">:id</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; obj.<span style="color:#9900CC;">to_param</span>
    assert_response <span style="color:#ff3333; font-weight:bold;">:redirect</span>
    assert_redirected_to version_path<span style="color:#006600; font-weight:bold;">&#40;</span>obj<span style="color:#006600; font-weight:bold;">&#41;</span>
    assert assigns<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:current_object</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">confirmed</span>?
    assert_not_nil flash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:notice</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    assert_equal <span style="color:#0066ff; font-weight:bold;">@user</span>, assigns<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:current_object</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">confirmer</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Have fun! Comments and suggestions are of course welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2010/05/05/confirmed-revisions-for-vestal_versions-10x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linkspopulismus</title>
		<link>http://www.hacksocke.de/2010/01/21/linkspopulismus/</link>
		<comments>http://www.hacksocke.de/2010/01/21/linkspopulismus/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 10:44:29 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Fail]]></category>
		<category><![CDATA[German]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Society]]></category>
		<category><![CDATA[Stupidity]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/2010/01/21/linkspopulismus/</guid>
		<description><![CDATA[Ich habe nie verstanden, warum gute Zeitungen nicht im ÖPNV-verträglichen Format kommen. Vielleicht offerieren die S- und U-Bahnen im süddeutschen Raum etwas mehr Platz für den Fahrgast, aber ich habe da noch Zweifel. Nicht zuletzt aus diesem Grund habe ich in der Vergangenheit immer wieder versucht, mich mit der taz anzufreunden – warm geworden bin [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe nie verstanden, warum gute <a href="http://www.zeit.de/">Zeit</a>ungen nicht im ÖPNV-verträglichen Format kommen. Vielleicht offerieren die S- und U-Bahnen im <a href="http://www.sueddeutsche.de/">süddeutschen</a> Raum etwas mehr Platz für den Fahrgast, aber ich habe da noch Zweifel. Nicht zuletzt aus diesem Grund habe ich in der Vergangenheit immer wieder versucht, mich mit der <a href="http://taz.de/">taz</a> anzufreunden – warm geworden bin ich mit derselben nie. Es ist gut möglich, dass ich den verschiedenen lokalen tazen (Mz.?) Unrecht tue, wenn ich sie mit der Hamburger taz Ã¼ber einen Kamm schere. Aber die Orthographie und das allgemeine <em>journalistische Wohlgefühl</em> hätte gegen eine Genfer Konvention der Berichterstattung verstoßen, wann immer ich mal eine Ausgabe zur Hand hatte (wenn es eine solche Konvention denn geben würde – wäre ein völkerrechtlicher Fortschritt).</p>
<p>Selbstredend würden das auch regelmäßig <a href="http://bild.de">andere Druckerzeugnisse</a> tun, aber wer sich selbst einmal beim Lesen des sich hinter dem vorangehenden Link befindlichen Blattes erwischt hat, mag einen Eindruck davon gewinnen, was der Kerl hier mit fehlendem <em>journalistischem Wohlgefühl</em> meint. Was man der BILD immerhin zugute halten muss: sie verfügen über ein Lektorat. Klar lässt dieses höchst absonderliche Neologismen (<strong>Volks</strong>-Verdummung?) durchwinken, aber nun…</p>
<p>Es mag ein Armutszeugnis im wörtlichen Sinn sein, will heißen, die Mannschaft kann sich ein Lektorat schlichtweg nicht leisten, aber für mich transportieren 2-3 Rechtschreibfehler auf der Titelseite oder im Leitartikel eine ganz andere Botschaft: hier hat man keine Zeit, sein Geschreibsel vor dem Druck nochmal durchzulesen. Und weitergesponnen: hatte man denn eigentlich Zeit, um für seinen Beitrag richtig zu recherchieren? Ein aktuelles Beispiel mag da der Artikel „<a href="http://www.taz.de/1/leben/alltag/artikel/1/revisionismus-nicht-mit-uns/">Revisionismus nicht mit uns</a>” ein, wo ein unter einer <a href="http://creativecommons.org/">CC</a>-Lizenz stehendes Photo als Titelbild verwendet wird, das aber mit dem Inhalt ungefähr gar nichts zu tun hat. Also höchstens so viel, wie ein nicht weiter kommentiertes Bild vom VW-Vorstand in einem Artikel über General Motos &amp; Co. sinnvoll wäre. Zu dumm nur, dass durch die Aufführung im Kontext des Artikels die auf dem Photo gezeigte Gruppe der <a href="http://www.c-p-d.info">CPD</a> (und damit der gesamte Verein) implizit in Miskredit gezogen wird. Aber mal soll ja auch nicht sofort alles glauben, <a href="http://www.reinhard-mey.de/content.php?id=436&amp;render=text_main">was in der Zeitung steht</a>.</p>
<p>Ich habe immer nur unregelmäßig Kontakt mit diesem Fachblatt für  Stammtisch-Linke gehabt. Aber sie schaffen es immer wieder, sich selbst zu unterbieten und meinen Eindruck zu festigen: die taz ist nunmal die BILD für <em>Genau!</em>-Sager links der Mitte, schlechter Journalismus und Linkspopulismus at its best.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2010/01/21/linkspopulismus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Postage for (secure) emails</title>
		<link>http://www.hacksocke.de/2009/10/15/postage-for-secure-emails/</link>
		<comments>http://www.hacksocke.de/2009/10/15/postage-for-secure-emails/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 09:49:02 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Society]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/2009/10/15/postage-for-secure-emails/</guid>
		<description><![CDATA[Yesterday I received an email from Thawte, (potentially) self-proclaimed globally leading authority for SSL certificates, informing me that their free email certificate program will be discontinued in about a month&#8217;s time. Verisign (which bought Thawte about a decade ago) offers current users of the Thawte Personal E-mail Certificates program to get a year free which [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I received an email from <a href="http://www.thawte.com/" rel="nofollow">Thawte</a>, (potentially) self-proclaimed globally leading authority for SSL certificates, informing me that their free email certificate program will be discontinued in about a month&#8217;s time. Verisign (which bought Thawte about a decade ago) offers current users of the Thawte Personal E-mail Certificates program to get a year free which would otherwise cost USD 20,- per year.</p>
<p>Thawte&#8217;s email certificate services are based on S/MIME, a standard for secure email communication that is supported by all common <abbr title="Mail User Agent">MUAs</abbr>. Although S/MIME is inferior to the <a href="http://en.wikipedia.org/wiki/GNU_Privacy_Guard" rel="nofollow">PGP/GPG</a> mechanism which allows encryption / signing of arbitrary data instead of just email contents, the aforementioned fact was what made me shift to S/MIME some months ago: it is accessible, whereas PGP/GPG requires not only the installation of plugins on the sender&#8217;s side, but also for everyone who might want to benefit from it (ie. your recipients). As virtually every MUA out there already provides the mechanics for S/MIME, everything gets reduced to your own initiative: to apply for an email certificate. Unfortunately, the way <a href="http://en.wikipedia.org/wiki/X.509" rel="nofollow">x.509</a> certificates work, you would need a Certificate Authority (CA)Â  which attests that you are, well, yourself. Thawte/Verisign is such a CA. The CA itself is listed in your MUA&#8217;s or system-wide catalogue of &#8220;trustworthy&#8221; root CAs and all certificates signed by those CAs inherit their status (ie. considered trustful if not configured otherwise).</p>
<p>The concept of giving trust to only one authority which earned their status by undergoing a more or less complex process (which, in case of Microsoft putting them into their certificate root, revolves around paying insane amounts of money), if at all, has flaws by it&#8217;s own right, of course. Without going into details: Thawte had a rather unique approach of mixing the x.509 certificate system with the <a href="http://en.wikipedia.org/wiki/Web_of_trust" rel="nofollow">Web of Trust</a> system, prominently used by PGP/GPG, easing the paranoia-struck people&#8217;s tension a bit.</p>
<p>Security is always about trade-offs: the most secure computer system is probably one cast into concrete, six stories beyond the ground and naturally without any input or output device whatsoever. It&#8217;s a trade-off between ease of use and maximum security and the trick is to find a balance that suits your own needs and standards, a role which S/MIME plays quite well.</p>
<p>I am not aware of other free x.509 email certificates that will work for common mail clients. As a security zealot, I might very well pay the yearly fee for the new paid services, but others may not. And there arises the problem: with the relative ease of setting up S/MIME based email security there were little &#8220;excuses&#8221; for the average user not to make use of it, even less so if you as an evangelist were aiding him/her in the setup process (which, truth be told, still wasn&#8217;t as self-explanatory as it should have been). However, the average user certainly won&#8217;t invest 15 â‚¬ p.a. into a technology completely unknown to them and which in addition will only add more complexity to their life. I can imagine it to be quite difficult to convince them otherwise: after all, the most common approach to (email) security is &#8220;<em>I have nothing to hide</em>&#8220;.</p>
<p>Of course I would still be able to digitally sign my emails, assuring the recipient that I was indeed the sender and that the email got to him/her untainted, but that is only half of it: I would not be able to encrypt emails when no one has access to a personal certificate / key. Thawte&#8217;s notice on discontinuing their service thus practically marks the death of S/MIME to me which worked conveniently over many years. Or will we pay for it? Are we ready to spend money on &#8220;postage for (secure) emails&#8221;?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2009/10/15/postage-for-secure-emails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trauer um Grundrechte</title>
		<link>http://www.hacksocke.de/2009/05/08/trauer-um-grundrechte/</link>
		<comments>http://www.hacksocke.de/2009/05/08/trauer-um-grundrechte/#comments</comments>
		<pubDate>Fri, 08 May 2009 09:53:54 +0000</pubDate>
		<dc:creator>carp</dc:creator>
				<category><![CDATA[Berlin]]></category>
		<category><![CDATA[German]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Society]]></category>

		<guid isPermaLink="false">http://www.hacksocke.de/2009/05/08/trauer-um-grundrechte/</guid>
		<description><![CDATA[&#8220;Zensursula&#8220;. Eine originelle und treffende Zusammenfassung, die ich letzte Woche auf einem Umzugswagen einer 1. Mai Demonstration gesehen habe. Und gestern spazierte ich auf dem Weg zur S-Bahn an einem Trauerplakat vorbei, das dank Photohandy hier auch Nicht-Berlinern nicht vorenthalten bleiben soll. Der Hintergrund: hinter dem Vorwand des Schutzes vor Kinderpornographie (von Bekämpfung kann man [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Trauer ums Grundgesetz" href="http://www.hacksocke.de/wp-content/uploads/2009/05/gg_trauer.jpg"><img src="http://www.hacksocke.de/wp-content/uploads/2009/05/gg_trauer.thumbnail.jpg" border="0" alt="Trauer ums Grundgesetz" hspace="10" vspace="5" align="right" /></a>&#8220;<a href="http://www.zensursula.net/">Zensursula</a>&#8220;. Eine originelle und treffende Zusammenfassung, die ich letzte Woche auf einem Umzugswagen einer 1. Mai Demonstration gesehen habe. Und gestern spazierte ich auf dem Weg zur S-Bahn an einem Trauerplakat vorbei, das dank Photohandy hier auch Nicht-Berlinern nicht vorenthalten bleiben soll. Der Hintergrund: hinter dem Vorwand des Schutzes vor Kinderpornographie (von Bekämpfung kann man gar nicht reden) wird derzeit in Deutschland eine umfassende Internetzensur eingeführt, die der in China und ähnlich totalitär geführten Nationen wohl in nichts nachsteht oder nachstehen wird. Die C&#8217;t fasst dieses sehr schon in <a href="http://www.heise.de/ct/Die-Argumente-fuer-Kinderporno-Sperren-laufen-ins-Leere--/artikel/135867">einem langem, aber sehr guten Artikel</a> zusammen. Und daher: schön brav bei der ePetition <a href="https://epetitionen.bundestag.de/index.php?action=petition;sa=details;petition=3860">Keine Indizierung und Sperrung von Internetseiten</a> mitzeichnen. Jetze! Der Server ist derzeit scheinbar herb überlastet &#8211; um Gregor zu zitieren: <q>Wer kann denn schon ahnen, dass der Bürger mitwirken will?</q> In dem Sinne: Abfahrt!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacksocke.de/2009/05/08/trauer-um-grundrechte/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

