<?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>BigSmoke &#187; Technology</title>
	<atom:link href="http://blog.bigsmoke.us/category/technology/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bigsmoke.us</link>
	<description>Smokes your problems, coughs fresh air.</description>
	<lastBuildDate>Sat, 04 Feb 2012 18:03:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Commenting fixed for blog.bigsmoke.us</title>
		<link>http://blog.bigsmoke.us/2012/02/04/upgraded-blog.bigsmoke.us</link>
		<comments>http://blog.bigsmoke.us/2012/02/04/upgraded-blog.bigsmoke.us#comments</comments>
		<pubDate>Sat, 04 Feb 2012 11:10:31 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[BigSmoke.US]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[blog.bigsmoke.us]]></category>
		<category><![CDATA[reCAPTCHA]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=2089</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>To my great surprise, thanks to <a href="http://vvv.tobiassjosten.net/">Tobias Sjösten</a>, I found out that commenting was broken on blog.bigsmoke.us. I couldn&#8217;t pinpoint the exact problem, but it must have been introduced with some WordPress upgrade somewhere along the line. I never noticed it because it did work for logged in users. (If I must really guess, I suspect a silent ReCaptcha version compatibility problem.)</p>
<p>Upgrading WordPress and wp-recaptcha to their latest versions (3.3.1 and 3.1.4 respectively) seems to have solved the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2012/02/04/upgraded-blog.bigsmoke.us/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MediaWiki ConfirmEdit/QuestyCaptcha extension</title>
		<link>http://blog.bigsmoke.us/2012/01/17/mediawiki-questycaptcha</link>
		<comments>http://blog.bigsmoke.us/2012/01/17/mediawiki-questycaptcha#comments</comments>
		<pubDate>Tue, 17 Jan 2012 13:43:44 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CAPTCHA]]></category>
		<category><![CDATA[ConfirmEdit]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[PALDAP]]></category>
		<category><![CDATA[QuestyCaptcha]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=2039</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Since I moved my <a href="http://www.paldap.org/">LDAP wiki</a> over from DokuWiki to MediaWiki, I&#8217;ve been burried by a daily torrent of spam. Just like with my <a href="http://wiki.hardwood-investments.net/">tropical timber investments wiki</a>, the ReCaptcha extension (with pretty intrusive settings) doesn&#8217;t seem to do much to stop this shitstream.</p>
<p>How do the spammers do this? Do they primarily trick visitors of other websites into solving this captchas for them or do they employ spam-sweatshops in third-world countries? Fuck them! I&#8217;m trying something new.</p>
<p>I&#8217;ve upgraded to the <a href="http://www.mediawiki.org/wiki/Extension:ConfirmEdit">ConfirmEdit extension</a>. (ReCaptcha has also moved into this extension.) This allows me to try different Captcha types. The one I was most interested in is QuestyChaptcha, which allows me to define a set of questions which the user needs to answer. I&#8217;m now trying it out with the following question:</p>
<p><pre class="php"><span style="color: #0000ff;">$wgCaptchaQuestions</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'question'</span> =&gt; <span style="color: #ff0000;">&quot;LDAP stands for ...&quot;</span>, <span style="color: #ff0000;">'answer'</span> =&gt; <span style="color: #ff0000;">&quot;Lightweight Directory Access Protocol&quot;</span> <span style="color: #66cc66;">&#41;</span>;</pre></p>
<p>I don&#8217;t think it&#8217;s a particularly good question, since it&#8217;s incredibly easy to Google. But, we&#8217;ll see, and in the mean time I&#8217;ll try to come up with one or two questions that are context-sensitive, yet easy enough to answer for anyone with some knowledge of LDAP. If you have an idea, please leave a comment. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2012/01/17/mediawiki-questycaptcha/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Safari: don&#8217;t give gzipped content a .gz extension</title>
		<link>http://blog.bigsmoke.us/2012/01/16/safari-ignores-content-type-for-gz-suffix</link>
		<comments>http://blog.bigsmoke.us/2012/01/16/safari-ignores-content-type-for-gz-suffix#comments</comments>
		<pubDate>Sun, 15 Jan 2012 22:39:13 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Make]]></category>
		<category><![CDATA[payformystay.com]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=2021</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Yesterday, while helping Caloe with the website for her company <a href="http://www.debuitenkok.nl/">De Buitenkok</a>, I came across the mother of all stupid bugs in Safari . Me having recently announced <a href="http://www.payformystay.com/">payformystay.com</a>, I loaded it up in Apple&#8217;s hipster browser only to notice that the CSS wasn&#8217;t loaded. Oops!</p>
<p>Reloading didn&#8217;t help, but … going over to the development version, everything loaded just fine. Conclusion? My recent optimizations—concatenating + gzipping all javascript and css—somehow fucked up payformystay for Safari users. The 14 Safari visitors (16.28% of our small group of alpha users) I received since the sixth must have gotten a pretty bleak image of the technical abilities of payformystay.com&#8217;s Chief Technician (me). <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </p>
<h2>The old <tt>cat | gzip</tt></h2>
<p>So, what happened?</p>
<p>To reduce the number of HTTP requests per page for all the JavaScript/CSS stuff (especially when none of it is in the browser cache yet), I made a few changes to my build file to scrape the <tt>&lt;head&gt;</tt> of my layout template (<tt>layout.php</tt>), which I made to look something like this:</p>
<p><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>DEV_MODE<span style="color: #66cc66;">&#41;</span>: <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;link rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> href=<span style="color: #ff0000;">&quot;/layout/jquery.ui.selectmenu.css&quot;</span> /&gt;                                   &lt;!--MERGE ME--&gt;
  &lt;link rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> href=<span style="color: #ff0000;">&quot;/layout/fancybox/jquery.fancybox-1.3.4.css&quot;</span> /&gt;                         &lt;!--MERGE ME--&gt;
  &lt;link rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> href=<span style="color: #ff0000;">&quot;/layout/style.css&quot;</span> /&gt;                                                  &lt;!--MERGE ME--&gt;
&nbsp;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/jquery-1.4.4.min.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                                          &lt;!--MERGE ME--&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/jquery.base64.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                                             &lt;!--MERGE ME--&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/jquery-ui-1.8.10.custom.min.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                               &lt;!--MERGE ME--&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/jquery.ui.selectmenu.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                                      &lt;!--MERGE ME--&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/jquery.cookie.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                                             &lt;!--MERGE ME--&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/fancybox/jquery.fancybox-1.3.4.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                            &lt;!--MERGE ME--&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/jquery.ba-hashchange.min.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                                  &lt;!--MERGE ME--&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/jquery.writeCapture-1.0.5-min.js&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;                             &lt;!--MERGE ME--&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span>: <span style="color: #808080; font-style: italic;"># if (!DEV_MODE) ?&gt;</span>
  &lt;link href=<span style="color: #ff0000;">&quot;/layout/motherofall.css.gz?2&quot;</span> rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> /&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/3rdparty.js.gz?2&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></p>
<p>It&#8217;s very simple: All the files with a “<tt>&#038;lt!--MERGE ME--&gt;</tt>” comment on the same line got concatenated and gzipped into <tt>motherofall.css.gz</tt> and <tt>3rdparty.js.gz</tt> respectively, like so:</p>
<p><pre class="php">MERGE_JS_FILES := $<span style="color: #66cc66;">&#40;</span>shell grep <span style="color: #ff0000;">'&lt;script.*&lt;!--MERGE ME--&gt;'</span> layout/layout.php|sed -e <span style="color: #ff0000;">'s/^.*&lt;script src=&quot;<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\(</span>[^&quot;]*<span style="color: #000099; font-weight: bold;">\)</span>&quot;.*/<span style="color: #000099; font-weight: bold;">\1</span>/'</span><span style="color: #66cc66;">&#41;</span>
MERGE_CSS_FILES := $<span style="color: #66cc66;">&#40;</span>shell grep <span style="color: #ff0000;">'&lt;link.*&lt;!--MERGE ME--&gt;'</span> layout/layout.php|sed -e <span style="color: #ff0000;">'s/^.*&lt;link .*href=&quot;<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\(</span>[^&quot;]*<span style="color: #000099; font-weight: bold;">\)</span>&quot;.*/<span style="color: #000099; font-weight: bold;">\1</span>/'</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
all: layout/3rdparty.js.gz layout/motherofall.css.gz
&nbsp;
layout/3rdparty.js.gz: layout/layout.php $<span style="color: #66cc66;">&#40;</span>MERGE_JS_FILES<span style="color: #66cc66;">&#41;</span>
        cat $<span style="color: #66cc66;">&#40;</span>MERGE_JS_FILES<span style="color: #66cc66;">&#41;</span> | gzip &gt; $@
&nbsp;
layout/motherofall.css.gz: layout/layout.php $<span style="color: #66cc66;">&#40;</span>MERGE_CSS_FILES<span style="color: #66cc66;">&#41;</span>
        cat $<span style="color: #66cc66;">&#40;</span>MERGE_CSS_FILES<span style="color: #66cc66;">&#41;</span> | gzip &gt; $@</pre></p>
<p>Of course, I simplified away the rest of my Makefile. You may notice that I could have used yui-compressor or something alike to minify the concatenated files before gzipping them, but yui-compressor chokes on some of the third-party stuff. I <em>am</em> using it for optimizing my own css/js (again, only in production).</p>
<h2>Safari ignores the <tt>Content-Type</tt> for anything ending in <tt>.gz</tt></h2>
<p>As far as the HTTP spec is concerned, “file” extensions mean absolutely nothing. They&#8217;re trivial drivel. Whether an URL ends in <tt>.gz</tt>, <tt>.css</tt>, <tt>.gif</tt> or <tt>.png</tt>, what it all comes down to is what the <tt>Content-Type</tt> header tells the browser about the response being sent.</p>
<p>You may have noticed me being lazy in the layout template above when I referenced the merged files:</p>
<p><pre class="php">&lt;link href=<span style="color: #ff0000;">&quot;/layout/motherofall.css.gz?2&quot;</span> rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> /&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/3rdparty.js.gz?2&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;</pre></p>
<p>I chose to directly reference the gzipped version of the css/js, even though I had a <tt>.htaccess</tt> files in place (within <tt>/layout/</tt>) which was perfectly capable of using the right <tt>Content-Encoding</tt> for each <tt>Accept-Encoding</tt>.</p>
<h3><tt>$ cat /layout/.htaccess</tt></h3>
<p><pre class="ini">AddEncoding gzip .gz
&nbsp;
RewriteEngine On
&nbsp;
RewriteCond %<span style="">&#123;</span>HTTP:Accept-Encoding<span style="">&#125;</span> gzip
RewriteCond %<span style="">&#123;</span>REQUEST_FILENAME<span style="">&#125;</span>.gz -f
RewriteRule ^<span style="">&#40;</span>.*<span style="">&#41;</span>$ $<span style="">1</span>.gz <span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>QSA,L<span style="">&#93;</span></span>
&nbsp;
&lt;Files *.css.gz&gt;
ForceType text/css
&lt;/Files&gt;
&nbsp;
&lt;Files *.js.gz&gt;
ForceType application/javascript
&lt;/Files&gt;</pre></p>
<p>You may notice that the <tt>.htaccess</tt> file contains some configuration to make sure that the <tt>.gz</tt> files are not served as something like <tt>application/gzip-compressed</tt>.</p>
<p>Anyway, I went to see if there were any browsers left that do not yet <tt>Accept-Encoding: gzip</tt> and could find none. When, yesterday, I was faced with an unstyled version of my homepage, my first reaction was (after the one where I was like hitting reload 20 times, embarrassedly mumbling something about “those damn browser-caches!”): “O then, apparently, Safari must be some exception to the rule that browsers have all been supporting gzip encoding for like forever!”</p>
<p>No, it isn&#8217;t so. Apparently <em>Safari ignores the <tt>Content-Type</tt> header for any resource with an URL ending in <tt>.gz</tt>.</em> Yes, that&#8217;s right. Safari understand <tt>Content-Encoding: gzip</tt> just fine. Not problems. Just don&#8217;t call it <tt>.gz</tt>.</p>
<h2>The new <tt>cat ; gzip</tt></h2>
<p>So, let&#8217;s remove the <tt>.gz</tt> suffix from these files and be done with it. The <tt>.htaccess</tt> was already capable of instructing all necessary negotiations to be able to properly serve the gzipped version only when it&#8217;s accepted (which is always, but I digress).</p>
<p>A few adjustments to my <tt>Makefile</tt>:</p>
<p><pre class="php">MERGE_JS_FILES := $<span style="color: #66cc66;">&#40;</span>shell grep <span style="color: #ff0000;">'&lt;script.*&lt;!--MERGE ME--&gt;'</span> layout/layout.php|sed -e <span style="color: #ff0000;">'s/^.*&lt;script src=&quot;<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\(</span>[^&quot;]*<span style="color: #000099; font-weight: bold;">\)</span>&quot;.*/<span style="color: #000099; font-weight: bold;">\1</span>/'</span><span style="color: #66cc66;">&#41;</span>
MERGE_CSS_FILES := $<span style="color: #66cc66;">&#40;</span>shell grep <span style="color: #ff0000;">'&lt;link.*&lt;!--MERGE ME--&gt;'</span> layout/layout.php|sed -e <span style="color: #ff0000;">'s/^.*&lt;link .*href=&quot;<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\(</span>[^&quot;]*<span style="color: #000099; font-weight: bold;">\)</span>&quot;.*/<span style="color: #000099; font-weight: bold;">\1</span>/'</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
all: layout/3rdparty.js.gz layout/motherofall.css.gz layout/pfms.<a href="http://www.php.net/min"><span style="color: #000066;">min</span></a>.js.gz
&nbsp;
layout/3rdparty.js: layout/layout.php $<span style="color: #66cc66;">&#40;</span>MERGE_JS_FILES<span style="color: #66cc66;">&#41;</span>
	cat $<span style="color: #66cc66;">&#40;</span>MERGE_JS_FILES<span style="color: #66cc66;">&#41;</span> &gt; $@
&nbsp;
layout/motherofall.css: layout/layout.php $<span style="color: #66cc66;">&#40;</span>MERGE_CSS_FILES<span style="color: #66cc66;">&#41;</span>
	cat $<span style="color: #66cc66;">&#40;</span>MERGE_CSS_FILES<span style="color: #66cc66;">&#41;</span> &gt; $@
&nbsp;
%.gz: %
	gzip -c $^ &gt; $@</pre></p>
<p>And here&#8217;s the simple change to my <tt>layout.php</tt> template:</p>
<p><pre class="php">&lt;link href=<span style="color: #ff0000;">&quot;/layout/motherofall.css?2&quot;</span> rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> /&gt;
  &lt;script src=<span style="color: #ff0000;">&quot;/layout/3rdparty.js?2&quot;</span> type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;/script&gt;</pre></p>
<p>That&#8217;s it. I welcome back all 14 Safari users looking for <a href="http://www.payformystay.com/">paid work abroad</a>! Be it that you&#8217;re looking for <a href="http://www.payformystay.com/">international work in Africa, in America, in Asia or in Europe</a>, please come visit and have a look at what we have on offer. <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2012/01/16/safari-ignores-content-type-for-gz-suffix/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing payformystay.com</title>
		<link>http://blog.bigsmoke.us/2012/01/06/announcing-payformystay.com</link>
		<comments>http://blog.bigsmoke.us/2012/01/06/announcing-payformystay.com#comments</comments>
		<pubDate>Fri, 06 Jan 2012 21:04:37 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[payformystay.com]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=2002</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Januari the first, a very good day to announce a new project that I&#8217;ve been working on this past year. Which I did, on Facebook and Twitter. Now, five days later, it&#8217;s time te repeat the announcement to give it some much-needed link-juice. I know that normal people don&#8217;t follow this blog. (<em>I</em> don&#8217;t even follow this blog!) But it does have PageRank. And it does have 4000 monthly visitors. Time for some link-whoring!</p>
<div id="attachment_2003" class="wp-caption alignright" style="width: 310px"><a href="http://blog.bigsmoke.us/uploads/2012/01/pfms-screenshot-top.png"><img src="http://blog.bigsmoke.us/uploads/2012/01/pfms-screenshot-top-300x160.png" alt="PFMS search screen - top" title="PFMS search screen - top" width="300" height="160" class="size-medium wp-image-2003" /></a><p class="wp-caption-text">PFMS search screen - top</p></div>
<div id="attachment_2004" class="wp-caption alignright" style="width: 310px"><a href="http://blog.bigsmoke.us/uploads/2012/01/pfms-screenshot-bottom.png"><img src="http://blog.bigsmoke.us/uploads/2012/01/pfms-screenshot-bottom-300x169.png" alt="PFMS search screen - bottom" title="PFMS search screen - bottom" width="300" height="169" class="size-medium wp-image-2004" /></a><p class="wp-caption-text">PFMS search screen - bottom</p></div>
<p>payformystay.com is a website for adventurers who&#8217;re looking for <a href="http://www.payformystay.com/">paid work abroad</a>. Whether you want to <a href="http://www.payformystay.com/search">work in Europe</a>, <a href="http://www.payformystay.com/search">work in Afrika</a>, <a href="http://www.payformystay.com/search">work in Asia</a>, <a href="http://www.payformystay.com/search">work in Australia</a> or whether you just want to do some <a href="http://www.payformystay.com/search">seasonal work</a> anywhere but home (<a href="http://www.payformystay.com/search">grape picking</a>, <a href="http://www.payformystay.com/search">strawberry harvest</a>, whatever you fancy). Of course we have many types of work: office jobs, tourism jobs, healthcare jobs, childcare jobs, wildlife jobs, anything.</p>
<p>The cool thing about payformystay, though, is that we only sport <strong>paid</strong> jobs. So, no wrestling through page after page of crappy offers where some evil cunt swine tries to make you pay for your own work. That&#8217;s right! Job offers on payformystay.com must at the very least include full board (something like a bed or tent and 3 meals daily) or enough pay to cover these basic living expenses! Offers are audited and violators are fed to the spammers.</p>
<p>Go get yourself a piece of the action:</p>
<p><strong><a href=http://www.payformystay.com/">payformystay.com – where people get paid to go on adventure</a></strong></p>
<p>Peace out. End of announcement.</p>
<p>Have fun! Be scared! Be tough! And be safe!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2012/01/06/announcing-payformystay.com/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting max memory of a Xen Dom0</title>
		<link>http://blog.bigsmoke.us/2011/09/07/setting-max-memory-of-a-xen-dom0</link>
		<comments>http://blog.bigsmoke.us/2011/09/07/setting-max-memory-of-a-xen-dom0#comments</comments>
		<pubDate>Wed, 07 Sep 2011 08:10:41 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1985</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had some issues with Xen crashing when I wanted to create a DomU for which the Dom0 had to shrink (see <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640500">bug report</a>). Therefore, it&#8217;s better to force a memory limit on the dom0. That is done with a kernel param.</p>
<p>Add this to /etc/default/grub:</p>
<p><pre class="php"><span style="color: #808080; font-style: italic;"># Start dom0 with less RAM</span>
GRUB_CMDLINE_XEN_DEFAULT=<span style="color: #ff0000;">&quot;dom0_mem=512M&quot;</span></pre></p>
<p>Then run update-grub2 and reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/09/07/setting-max-memory-of-a-xen-dom0/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing a broken Xen DomU after upgrading to Ubuntu 11.4 (Natty)</title>
		<link>http://blog.bigsmoke.us/2011/09/02/fixing-a-broken-xen-domu-after-upgrading-to-ubuntu-11.4-natty</link>
		<comments>http://blog.bigsmoke.us/2011/09/02/fixing-a-broken-xen-domu-after-upgrading-to-ubuntu-11.4-natty#comments</comments>
		<pubDate>Fri, 02 Sep 2011 10:31:49 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[natty]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1981</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>My Xen DomU&#8217;s that I upgraded to 11.4 no longer booted, because the xen-blkfront module is missing from the initramfs. To fix, do this when you get the initramfs prompt:</p>
<p><pre class="php">modprobe xen-blkfront
<a href="http://www.php.net/exit"><span style="color: #000066;">exit</span></a></pre></p>
<p>Then after it&#8217;s booted:</p>
<p><pre class="php">root@ubuntu:~<span style="color: #808080; font-style: italic;"># echo &quot;xen-blkfront&quot; &gt;&gt; /etc/initramfs-tools/modules</span>
root@ubuntu:~<span style="color: #808080; font-style: italic;"># update-initramfs -u </span></pre></p>
<p><a href="http://www.mmacleod.ca/blog/2011/05/ubuntu-natty-narwhal-and-xen/">Source</a>.</p>
<p>Also look at <a href="http://blog.bigsmoke.us/2011/09/02/fixing-a-xen-domus-grub-config">this</a> post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/09/02/fixing-a-broken-xen-domu-after-upgrading-to-ubuntu-11.4-natty/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing a Xen DomU&#8217;s grub config</title>
		<link>http://blog.bigsmoke.us/2011/09/02/fixing-a-xen-domus-grub-config</link>
		<comments>http://blog.bigsmoke.us/2011/09/02/fixing-a-xen-domus-grub-config#comments</comments>
		<pubDate>Fri, 02 Sep 2011 10:30:36 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[GRUB]]></category>
		<category><![CDATA[pygrub]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1982</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>When you use xen-create-image to bootstrap an ubuntu, it sets up a grub config file menu.lst. However, this boot config is not kept up-to-date with newer ubuntu&#8217;s because they use grub2 (which uses grub.cfg and not menu.lst). And Xen&#8217;s pygrub first looks at menu.lst, so if you have a stale file, it will always boot an old kernel.</p>
<p>I &#8216;Fixed&#8217; it like this (a real fix I have yet to devise, but this works. Actually, I think it is a bug):</p>
<p>The grub hooks in Debian and Ubuntu don&#8217;t take the fact into account that the machine might be running as paravirtualized VM. Therefore, it can&#8217;t find /dev/xvda to install grub on, which it shouldn&#8217;t try. Bug reports exist about this, but it is not deemed important, it seems. The result is that the menu.lst that was created by xen-create-image is never updated and updates to the kernel are never booted.</p>
<p>Pygrub considers menu.lst over grub.cfg (which would give problems with upgrading to grub2). But you can also use it to your advantage. You can edit /etc/kernel-img.conf to look like this (do_symlinks = yes and no hooks):</p>
<p><pre class="php">do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
postinst_hook =
postrm_hook   =</pre></p>
<p>And then make /boot/grub/menu.lst with this:</p>
<p><pre class="php"><span style="color: #000000; font-weight: bold;">default</span>         <span style="color: #cc66cc;">0</span>
timeout         <span style="color: #cc66cc;">2</span>
&nbsp;
title           Marauder
root            <span style="color: #66cc66;">&#40;</span>hd0,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
kernel          /vmlinuz root=/dev/xvda2 ro
initrd          /initrd.img</pre></p>
<p>Then uninstall grub. This way, you always boot the new kernel.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/09/02/fixing-a-xen-domus-grub-config/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CUPS printer driver for my HP4050</title>
		<link>http://blog.bigsmoke.us/2011/08/17/cups-printer-driver-for-my-hp4050</link>
		<comments>http://blog.bigsmoke.us/2011/08/17/cups-printer-driver-for-my-hp4050#comments</comments>
		<pubDate>Wed, 17 Aug 2011 21:13:23 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[4050]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[hp4050]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1972</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>My HP4050 has a million different drivers to choose from. Some don&#8217;t have the maximum DPI, some don&#8217;t have other options, like selecting paper output. The one that works the best seems to be &#8220;HP LaserJet 4050 Series Postscript (recommended) (grayscale, 2-sided printing)&#8221;. However, I have no idea anymore if that came from hplip, foomatic, gutenprint, or whatever.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/08/17/cups-printer-driver-for-my-hp4050/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a MySQL database from latin1 to utf8</title>
		<link>http://blog.bigsmoke.us/2011/08/16/converting-a-mysql-database-from-latin1-to-utf8</link>
		<comments>http://blog.bigsmoke.us/2011/08/16/converting-a-mysql-database-from-latin1-to-utf8#comments</comments>
		<pubDate>Tue, 16 Aug 2011 13:49:49 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1969</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><pre class="php">mysqldump dbname &gt; dbname_bak_before_messing_with_it.sql
mysqldump --default-character-set=latin1 --skip-set-charset dbname &gt; dump.sql
sed -r <span style="color: #ff0000;">'s/latin1/utf8/g'</span> dump.sql &gt; dump_utf.sql
<a href="http://www.php.net/mysql"><span style="color: #000066;">mysql</span></a> --execute=<span style="color: #ff0000;">&quot;DROP DATABASE dbname; CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;&quot;</span> 
<a href="http://www.php.net/mysql"><span style="color: #000066;">mysql</span></a> --default-character-set=utf8 dbname &lt; dump_utf.sql</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/08/16/converting-a-mysql-database-from-latin1-to-utf8/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a postfix fallback MX</title>
		<link>http://blog.bigsmoke.us/2011/05/22/setting-up-a-postfix-fallback-mx</link>
		<comments>http://blog.bigsmoke.us/2011/05/22/setting-up-a-postfix-fallback-mx#comments</comments>
		<pubDate>Sun, 22 May 2011 07:51:48 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[mx]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1957</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>These are some short stepts and pointers to setup a postfix fallback MX. It does not describe postfix basics, nor how to install Mailscanner (a necessisity, because spammers like sending spam to fallback MX&#8217;s because they&#8217;re usually not as well protected).</p>
<p>First, postfix has a special transport, called &#8216;relay&#8217;, which is the same as SMTP, except that it doesn&#8217;t send to the backup MX. In this case, that means it doesn&#8217;t send to itself, avoiding loops. The relay transport is the default for all the domains you specify in the relay_domains parameter. </p>
<p>Should the machine have a relayhost defined, you need to disable that for each of the domains you&#8217;re a backup MX for. You can do that with transport_maps. In my case, the transport_maps is hash:/etc/postfix/transport_maps. That is a key-value file on which you run &#8216;postmap&#8217; after you&#8217;ve edited it. In it, specify this (the comments explain it):</p>
<p><pre class="php"><span style="color: #808080; font-style: italic;"># When you specify a transport without nexthop, it resets the relay to the</span>
<span style="color: #808080; font-style: italic;"># recipient domain (see man 5 transport). And, when the transport is relay,</span>
<span style="color: #808080; font-style: italic;"># postfix will not relay to the backup MX, to prevent loops back to itself. So,</span>
<span style="color: #808080; font-style: italic;"># because this host has a default relayhost, use the folowwing when you want to</span>
<span style="color: #808080; font-style: italic;"># specify a domain for which we are backup MX: </span>
<span style="color: #808080; font-style: italic;"># example.com            relay </span></pre></p>
<p>The next step you want to do is take measures to prevent mails to non-existent users piling up in the queue. Because spam is sent to the backup MX all the time, it will relay it to the primary, which rejects it. Your backup host will then bounce all kinds of spam mails&#8230;</p>
<p>To fix that, we instruct postfix to use <a href="http://www.postfix.org/ADDRESS_VERIFICATION_README.html">recipient address verification</a>. This causes it to probe the primary host to check the address exists (and caches that info) before relaying.</p>
<p>To enable it, do this:</p>
<p><pre class="php">smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, reject_unknown_recipient_domain, reject_unverified_recipient
unverified_recipient_reject_reason = Address lookup failed
<span style="color: #808080; font-style: italic;"># Prevent caching non-existent users, to prevent delivery failures when new users are unknown still.</span>
address_verify_negative_cache = no
<span style="color: #808080; font-style: italic;"># Setting to 550 to make a reject a fatal error, not a defer.</span>
unverified_recipient_reject_code = <span style="color: #cc66cc;">550</span>
<span style="color: #808080; font-style: italic;"># The point of a backup MX is to accept mail when the primary is down, so setting this prevents incoming mail being deferred when the address probe cannot be done.</span>
<span style="color: #808080; font-style: italic;"># TODO: find out how to actually implement it, because it doesn't work; permit it not a valid option here.</span>
<span style="color: #808080; font-style: italic;">#unverified_recipient_tempfail_action = permit </span></pre></p>
<p>The reject_unknown_recipient_domain  prevents probes to domains that don&#8217;t exist.</p>
<p>Some extra options, not strictly related to being a backup MX:</p>
<p><pre class="php">smtpd_sender_restrictions = reject_unknown_sender_domain, reject_unknown_helo_hostname
unknown_address_reject_code = <span style="color: #cc66cc;">550</span>
<span style="color: #808080; font-style: italic;"># Override the default of 5 days, because the point of a backup MX is to keep it around for a while.</span>
maximal_queue_lifetime = 21d</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/05/22/setting-up-a-postfix-fallback-mx/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

