<?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; Rowan Rodrik</title>
	<atom:link href="http://blog.bigsmoke.us/author/rowan/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>Why doesn&#8217;t he just…</title>
		<link>http://blog.bigsmoke.us/2012/02/04/why-doesn-he-just</link>
		<comments>http://blog.bigsmoke.us/2012/02/04/why-doesn-he-just#comments</comments>
		<pubDate>Sat, 04 Feb 2012 17:50:53 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Nakedness]]></category>
		<category><![CDATA[gossip]]></category>
		<category><![CDATA[superiority]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=2084</guid>
		<description><![CDATA[You know the conversation. You <em>had</em> the conversation: “Why doesn't he just …”]]></description>
			<content:encoded><![CDATA[<p>You know the conversation. You <em>had</em> the conversation:<br />
“Why doesn&#8217;t he just …”<br />
“I don&#8217;t understand why he can&#8217;t simply …”<br />
“If he&#8217;d only …”</p>
<p>Usually followed by: “I used to, but I …”<br />
Or: “At least you have (not) …”</p>
<p>Well, I had this conversation, but at least I …<br />
I am writing about it, so that at least you …</p>
<p>You know the truth:<br />
No, he can&#8217;t just …<br />
At least, he couldn&#8217;t …</p>
<p>Now, you might …<br />
But if it&#8217;d be so easy to …<br />
You wouldn&#8217;t be congratulating each other that …<br />
You&#8217;re just slightly better than him …</p>
<p>How does it feel?<br />
Safe?</p>
<p>If only you would …</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2012/02/04/why-doesn-he-just/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Psychopathic Saturday</title>
		<link>http://blog.bigsmoke.us/2012/01/21/psychopathic-saturday</link>
		<comments>http://blog.bigsmoke.us/2012/01/21/psychopathic-saturday#comments</comments>
		<pubDate>Sat, 21 Jan 2012 12:30:46 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Nakedness]]></category>
		<category><![CDATA[psychopathy]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=2068</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to pump up myself to write a piece of text about psychopathy. All three other group members already wrote <em>their</em> part. We&#8217;re making a scientific poster titled “Is there a psychopath hidden in your brain?” But, do I even want to know? It&#8217;s all very close to home, with a mother who&#8217;s been accusing her ex-husband (my dad) of being a psychopath for, like, forever, and, simultaneously, this monkey in my brain, pointing it&#8217;s accusative little finger straight at me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2012/01/21/psychopathic-saturday/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>I am naked and feeling very vulnerable</title>
		<link>http://blog.bigsmoke.us/2012/01/20/i-am-naked-and-feeling-very-vulnerable</link>
		<comments>http://blog.bigsmoke.us/2012/01/20/i-am-naked-and-feeling-very-vulnerable#comments</comments>
		<pubDate>Thu, 19 Jan 2012 22:12:56 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Nakedness]]></category>
		<category><![CDATA[deception]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=2057</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>There are many clever ways to tell you this. There are many ways to deceive. But in the end I feel that more often than not the deception merely serves to reinforce that image of a very vulnerable naked man.</p>
<p>Thus: <i>“I am naked and feeling very vulnerable.”</i></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2012/01/20/i-am-naked-and-feeling-very-vulnerable/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>Ubuntu Desktop Linux and Acer TravelMate 7513WSMi</title>
		<link>http://blog.bigsmoke.us/2011/02/03/ubuntu-desktop-linux-and-acer-travelmate-7513wsmi</link>
		<comments>http://blog.bigsmoke.us/2011/02/03/ubuntu-desktop-linux-and-acer-travelmate-7513wsmi#comments</comments>
		<pubDate>Wed, 02 Feb 2011 22:55:17 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Acer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[TravelMate 7513WSMi]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1825</guid>
		<description><![CDATA[My youngest sister has retired her big-ass (17") Acer TravelMate (model 7513WSMi 7510) with a more modern offering from Sony. That was last year. Now, she thought it'd be a good idea to donate it to our oldest sister. But since the thing has always “run” like a pig with Windows Vista, her girl-geek instincts thought it better if I'd equip the old monster with Ubuntu Linux instead.]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.bigsmoke.us/uploads/2011/01/acer-travelmate-7513wsmi.jpg" alt="" title="acer-travelmate-7513wsmi" width="440" height="336" class="alignright size-full wp-image-1833" /></p>
<p>My youngest sister has retired her big-ass (17&#8243;) Acer TravelMate (model 7513WSMi 7510) with a more modern offering from Sony. That was last year. Now, she thought it&#8217;d be a good idea to donate it to our oldest sister. But since the thing has always “run” like a pig with Windows Vista, her girl-geek instincts thought it better if I&#8217;d equip the old monster with Ubuntu Linux instead.</p>
<h2>AMD 64bit</h2>
<p>I&#8217;m also considering upgrading my own laptop to 64 bit. (They&#8217;ve told me that, really, the 32 bit age is over.) So, the first thing I&#8217;m trying to find out (now that I&#8217;m getting on the 64 bit train) is if this thing supports 64 bit. I can&#8217;t really think of a quick way to find out, so I&#8217;m just going to create a 64bit installation CD and see how that works.</p>
<p>…</p>
<p>Or, I could have just popped open the hood to see the “AMD Turion64x2 Mobile Technology” sticker. <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_eek.gif' alt='8-O' class='wp-smiley' /> </p>
<h2>Installation</h2>
<p>After changing the boot order, the installation CD (burned from my T61 using “<tt>wodim -data ubuntu-10.10-desktop-amd64.iso</tt>”) seems to be booting despite the worrying sounds that seem to indicate that the laptop is trying to rip apart and eat the disc.</p>
<p>I&#8217;m surprised how good the current installation program looks and that it asks me if I want to “download updates while installing” and “install third-party software”. Nice.</p>
<p>Great idea to ask all the annoying questions (timezone, etc.) during installation instead of after! I&#8217;m amused with how much I&#8217;m behind the time if I see all the promotional screens for new and improved software which is meant to keep me inspired during the installation process. “OpenOffice.org is fully compatible with Microsoft Office[...]” Am I really that much behind with the times? Nah, I can&#8217;t imagine. I must still have some very, very nasty Excel sheet lying around somewhere, gathering dust. If I feed that monster of a thing to OpenOffice, then I&#8217;m pretty sure… Yeah, that&#8217;s going to be fun. <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_twisted.gif' alt=':twisted:' class='wp-smiley' /> </p>
<h2>Post-installation configuration</h2>
<p>I had expected to spend at least an hour or two hunting around forums to find solutions for obscure driver-related issues and other nuisances. But no issues popped up. It just worked. Ubuntu is <strong>very</strong> compatible with the Acer TravelMate 7513WSMi! <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>So, I spent some of the time saved on setting a user pic and a few other niceties, but I refrained from doing anything fancy, because I&#8217;ve figured out a new sister support strategy that I might blog about later. (It involves a four-hour work-week&#8230;)</p>
<p>[For my own reference, I started on the first draft of this post on Januari 14.]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/02/03/ubuntu-desktop-linux-and-acer-travelmate-7513wsmi/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a shell-script run with setuid root</title>
		<link>http://blog.bigsmoke.us/2011/02/03/suid-shell-script</link>
		<comments>http://blog.bigsmoke.us/2011/02/03/suid-shell-script#comments</comments>
		<pubDate>Wed, 02 Feb 2011 22:45:50 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[setuid]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1863</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>If you want to run a process with root privileges that you can invoke as a less unprivileged user, you can make the program setuid root. This can be very useful, for example, when you want a PHP or CGI script to call a backup process, or to create a new site or irrevocably delete you whole system. The latter example points to a serious security problem: if anyone can figure out a way to make your program do something you don&#8217;t want, you&#8217;re screwed, because you just gave them root privileges to wreak maximum havoc. That&#8217;s why, normally, scripts (anything executed by an interpreter by the kernel because of a shebang) won&#8217;t get elevated privileges when you set their setuid bit.</p>
<p>To understand the setuid bit, let&#8217;s first see what happens when I try to cat a file that belongs to root:</p>
<p><pre class="bash">su -
<span style="color: #808080; font-style: italic;"># I am now root; fear me</span>
touch no-one-can-touch-me
chmod <span style="color: #cc66cc;">600</span> no-one-can-touch-me
<span style="color: #000066;">exit</span>
cat no-one-can-touch-me
<span style="color: #808080; font-style: italic;"># cat: Permission denied </span></pre></p>
<p>Next, I&#8217;ll create a shell script that cats the file:</p>
<p><pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/bash</span>
&nbsp;
cat no-one-can-touch-me</pre></p>
<p>And make the script setuid root:</p>
<p><pre class="bash">su -
chown root:root script.sh
chmod +xs script.sh</pre></p>
<p>If I now execute the script, I still get the permission denied. What I need to make this work is a wrapper program. For that, I refer to Wiebe&#8217;s <a href="http://blog.bigsmoke.us/2011/02/02/executing-system-commands-from-php-with-suid-executable">post</a> about the same subject. (Yeah, I know: why bother publishing this if Wiebe already did an excellent job explaining? Well, I just hate to throw away an otherwise fine draft.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/02/03/suid-shell-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove appending slash from a path using Sed</title>
		<link>http://blog.bigsmoke.us/2011/01/29/sed-remove-appending-slash</link>
		<comments>http://blog.bigsmoke.us/2011/01/29/sed-remove-appending-slash#comments</comments>
		<pubDate>Sat, 29 Jan 2011 19:49:26 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1849</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how you can remove the appending slash from a path using sed, the <b>s</b>tream <b>ed</b>itor:</p>
<p><pre class="bash"><span style="color: #000066;">echo</span> /just/a/path/ | sed -e <span style="color: #ff0000;">'s#/$##'</span>
<span style="color: #808080; font-style: italic;"># Output: /just/a/path</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># And, if there isn't an appending slash, nothing happens:</span>
&nbsp;
<span style="color: #000066;">echo</span> /just/another/path | sed -e <span style="color: #ff0000;">'s#/$##'</span>
<span style="color: #808080; font-style: italic;"># Output: /just/another/path </span></pre></p>
<p>It works quite simple. Sed executes <em>expression</em> (<tt>-e</tt>) on its standard input. The expression is a substitution using regular expressions. The <tt>#</tt>-sign is the delimiter. The part (<tt>#/</tt>) between the first two hash signs is the matching expression and the (empty) part between the second and the third hash sign is the replacement expression. This expression (“<tt>s#/$##</tt>”) basically says: replace all occurrences of “<tt>/</tt>” at the end of the line (the dollar sign is the end-of-line anchor) with nothing.</p>
<p>To use this in a script is easy-peasy. Suppose <tt>$1</tt> is a system path that may or may not include an appending slash:</p>
<p><pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #0000ff;">sanitized_path=</span>`<span style="color: #000066;">echo</span> <span style="color: #ff0000;">&quot;$1&quot;</span> | sed -e <span style="color: #ff0000;">'s#/$##'</span>`
&nbsp;
<span style="color: #000066;">echo</span> <span style="color: #0000ff;">$sanitized_path</span></pre></p>
<p>This script outputs its first parameter with the appending slash removed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2011/01/29/sed-remove-appending-slash/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

