<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Cretaceous Labs</title>
	
	<link>http://cretaceouslabs.com/blog</link>
	<description />
	<lastBuildDate>Fri, 06 Aug 2010 19:59:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CretaceousLabsBlog" /><feedburner:info uri="cretaceouslabsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Deploy a specific revision with Capistrano</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/0xJUWNijoOM/</link>
		<comments>http://cretaceouslabs.com/blog/2010/08/deploy-specific-revision-capistrano/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 19:50:49 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Capistrano]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=195</guid>
		<description><![CDATA[Just about every website that I release, be it at work or at home, is stored in a Git repository, and deployed using Capistrano.
I&#8217;ve been debugging this PHP application at work that was written by a 3rd-party. After cleaning up the XSS and SQL injection vulnerabilities in it, we found a new bug. It&#8217;s minor, [...]]]></description>
			<content:encoded><![CDATA[<p>Just about every website that I release, be it at work or at home, is stored in a <a title="Git" href="http://git-scm.com/">Git</a> repository, and deployed using <a title="Capistrano" href="http://capify.org/">Capistrano</a>.</p>
<p>I&#8217;ve been debugging this PHP application at work that was written by a 3rd-party. After cleaning up the XSS and SQL injection vulnerabilities in it, we found a new bug. It&#8217;s minor, yet important.</p>
<p>While tracking down the offending line, I needed to deploy various revisions of the website. It turns out that it&#8217;s really easy to do this with <a title="Capistrano" href="http://capify.org/">Capistrano</a>:</p>
<pre>$ cap -S revision=3f30b6de3c55a8347e5f3de3b43193591e6c7322 beta deploy</pre>
<p>One thing I noticed was the need to provide the full SHA-1 object name (AKA revision ID, commit ID). Normally with Git, you can provide the first few characters of a commit ID. For example:</p>
<pre>$ git checkout 3f30b6de</pre>
<p>instead of</p>
<pre>$ git checkout 3f30b6de3c55a8347e5f3de3b43193591e6c7322</pre>
<p>I guess Capistrano&#8217;s a bit more picky!</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/0xJUWNijoOM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/08/deploy-specific-revision-capistrano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/08/deploy-specific-revision-capistrano/</feedburner:origLink></item>
		<item>
		<title>Answers are for losers</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/d8H7Cnj04Zg/</link>
		<comments>http://cretaceouslabs.com/blog/2010/04/answers-losers/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 15:10:44 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=156</guid>
		<description><![CDATA[What do you want: questions, or answers? Most people want answers. There&#8217;s a problem you need to solve, and the answer&#8217;ll let you continue working. That&#8217;s fine. That&#8217;s valid.
But is it interesting?
I was talking with @ghuber about a new idea I had. Without going into details, it&#8217;d pigeon-hole me into That Answer Guy.
How do you [...]]]></description>
			<content:encoded><![CDATA[<p>What do you want: questions, or answers? Most people want answers. There&#8217;s a problem you need to solve, and the answer&#8217;ll let you continue working. That&#8217;s fine. That&#8217;s valid.</p>
<p>But is it interesting?</p>
<p>I was talking with <a title="@ghuber on Twitter" href="http://twitter.com/ghuber">@ghuber</a> about a new idea I had. Without going into details, it&#8217;d pigeon-hole me into That Answer Guy.</p>
<blockquote><p>How do you solve X? Here you go! The answer&#8217;s ABC.</p></blockquote>
<p style="text-align: left;">BOR-fucking-ING. If you&#8217;re That Answer Guy, you&#8217;re giving away valuable resources, but not actively facilitating much further discussion or innovation. Your community&#8217;ll appreciate the answer. Kudos to you. Thanks, Teach!<img class="aligncenter size-full wp-image-175" style="border: 0" title="The Answer Man movie poster" src="http://cretaceouslabs.com/blog/wp-content/uploads/2010/03/The_Answer_Man_movie_poster1.png" alt="The Answer Man movie poster" width="250" height="316" /></p>
<p>But it doesn&#8217;t make you <em>interesting</em>.</p>
<p>Instead, you want to ask questions. Lots of questions. Oddball questions. Edge-case questions. What happens if I turn this to 11? What if I mix <a title="monorail cat" href="http://icanhascheezburger.com/2007/01/12/monorail-cat-2/">lolcats</a> with quantum theory?</p>
<p>Think of it this way: Who do you want <a title="Giles' presentation at FutureRuby" href="http://gilesbowkett.blogspot.com/2008/10/archaeopteryx-rubyfringe-presentation.html">presenting</a> at a <a title="FutureRuby" href="http://futureruby.com/">conference</a>? Who do you want to shoot the shit with over a beer? Who thinks of wacky stuff? The guy who knows how to do X when you have Y, or the guy who asks interesting questions and ponders new ways of doing things?</p>
<p>The latter, damn it!</p>
<p>That Answer Guy is useful and appreciated. He definitely is. But the role&#8217;s limited. It confines you. It defines what questions you ask, and what problems you solve.</p>
<p>Ask more questions. Write more software. Pursue tangents. And talk about it.</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/d8H7Cnj04Zg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/04/answers-losers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/04/answers-losers/</feedburner:origLink></item>
		<item>
		<title>If Plasma dies, here’s what to do</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/v-ILeVHaRv8/</link>
		<comments>http://cretaceouslabs.com/blog/2010/01/if-plasma-dies-heres-what-to-do/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 17:45:18 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=145</guid>
		<description><![CDATA[Every now and then, the Plasma desktop in KDE 4 crashes on me. Usually, it restarts itself. Sometimes, it doesn&#8217;t.
If you&#8217;re cursed with the latter scenario, there&#8217;s an easy solution.
Note: As avocadohead kindly mentioned in the comments, KDE &#62;= 4.3 has renamed &#8220;plasma&#8221; to &#8220;plasma-desktop&#8221;. So if you&#8217;re using KDE 4.3 or later, replace &#8220;plasma&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then, the Plasma desktop in KDE 4 crashes on me. Usually, it restarts itself. Sometimes, it doesn&#8217;t.</p>
<p>If you&#8217;re cursed with the latter scenario, there&#8217;s an easy solution.</p>
<p><strong>Note</strong>: As avocadohead kindly mentioned in the comments, KDE &gt;= 4.3 has renamed &#8220;plasma&#8221; to &#8220;plasma-desktop&#8221;. So if you&#8217;re using KDE 4.3 or later, replace &#8220;plasma&#8221; with &#8220;plasma-desktop&#8221; in the commands below.</p>
<p>By default, KDE sets the keyboard shortcut for &#8220;Run Command&#8221; to ALT+F2. So hit ALT+F2, and type this, and hit enter:</p>
<pre>kbuildsycoca4 &amp;&amp; kquitapp plasma &amp;&amp; kstart plasma</pre>
<p>Plasma should pop back to life.</p>
<p>That command is actually three commands:</p>
<ol>
<li><em>kbuildsycoca4</em> rebuilds KDE&#8217;s system configuration cache.</li>
<li><em>kquitapp plasma</em> ensures that Plasma&#8217;s no longer running, instead of just, say, hung.</li>
<li><em>kstart plasma</em> starts Plasma.</li>
</ol>
<p>It took me a while to figure this out. Thanks to <a href="http://eumenidae.blogspot.com/2008/12/kill-and-restart-plasma.html">this post</a>, I learned about <em>kstart</em>. From what I&#8217;ve read, it seems that running <em>kquitapp plasma</em> and <em>kstart plasma</em> from the CLI works for some people. Unfortunately, they fail for me on the CLI:</p>
<pre>[nickh@chameleon ~] kquitapp plasma
&lt;unknown program name&gt;(7282)/: "Application plasma could not be found using service org.kde.plasma and path /MainApplication."
[nickh@chameleon ~]
[nickh@chameleon ~] kstart plasma
Qt: Session management error: Could not open network socket
kstart(7394) main: Omitting both --window and --windowclass arguments is not recommended
[nickh@chameleon ~] &lt;unknown program name&gt;(7397)/ checkComposite: Plasma has an argb visual 0x9ca7300 71303169
&lt;unknown program name&gt;(7397)/ checkComposite: Plasma can use COMPOSITE for effects on 0x9ca6c18
plasma(7398): KUniqueApplication: Cannot find the D-Bus session server

plasma(7397): KUniqueApplication: Pipe closed unexpectedly.

[nickh@chameleon ~]</pre>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/v-ILeVHaRv8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/01/if-plasma-dies-heres-what-to-do/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/01/if-plasma-dies-heres-what-to-do/</feedburner:origLink></item>
		<item>
		<title>Matching Printable Characters</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/lDeSyd2x6WA/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:10:17 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=138</guid>
		<description><![CDATA[Who doesn&#8217;t love regular expressions? They&#8217;re fucking awesome. I use&#8217;em at least 10 times per day.
Sometimes, there&#8217;re restrictions on what patterns you can use. I wanted to change a regex for validating passwords. Originally, it allowed letters, numbers, and a seemingly random collection of special characters. How lame is this?:
^[A-Za-z0-9]{1}[A-Za-z0-9_\\.\\!\@\#\-]{0,255}$
Not only are the allowed special [...]]]></description>
			<content:encoded><![CDATA[<p>Who doesn&#8217;t love regular expressions? <a href="/blog/wp-content/uploads/2009/11/dino-riders.jpg" alt="Dino-Riders: They're fucking awesome">They&#8217;re fucking awesome.</a> I use&#8217;em at least 10 times per day.</p>
<p>Sometimes, there&#8217;re restrictions on what patterns you can use. I wanted to change a regex for validating passwords. Originally, it allowed letters, numbers, and a seemingly random collection of special characters. How lame is this?:</p>
<pre>^[A-Za-z0-9]{1}[A-Za-z0-9_\\.\\!\@\#\-]{0,255}$</pre>
<p>Not only are the allowed special characters arbitrary, but they&#8217;re escaping characters in a character class, and using &#8220;{1}&#8221;.</p>
<p>I tried changing the regex to this:</p>
<pre>^[[:print:]]{0,255}$</pre>
<p>Unfortunately, that wasn&#8217;t considered &#8220;valid&#8221; by the system in question. Luckily, there&#8217;s a fairly concise alternative:</p>
<pre>^[\x20-\x7E]{0,255}$</pre>
<p>If you find a system that lacks support for POSIX character classes, check out <a href="http://en.wikipedia.org/wiki/Regular_expression#POSIX_character_classes" alt="POSIX character classes on Wikipedia">this Wikipedia article</a>.</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/lDeSyd2x6WA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/</feedburner:origLink></item>
		<item>
		<title>Displaying Your ViM Colour Scheme</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/fT54xI7njSA/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/displaying-vim-colour-scheme-2/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 18:08:32 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[ViM]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=133</guid>
		<description><![CDATA[I posted this mostly because I&#8217;m always forgetting it, and also because it&#8217;s a pain in the ass to search for on Google. I usually try &#8220;:echo g:colorscheme&#8221;, which fails miserably.
If you&#8217;re playing around with colour schemes in ViM and want to figure out which one is being used at the moment, simply type:
:echo g:colors_name
]]></description>
			<content:encoded><![CDATA[<p>I posted this mostly because I&#8217;m always forgetting it, and also because it&#8217;s a pain in the ass to search for on Google. I usually try &#8220;:echo g:colorscheme&#8221;, which fails miserably.</p>
<p>If you&#8217;re playing around with colour schemes in ViM and want to figure out which one is being used at the moment, simply type:</p>
<pre>:echo g:colors_name</pre>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/fT54xI7njSA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/displaying-vim-colour-scheme-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/displaying-vim-colour-scheme-2/</feedburner:origLink></item>
		<item>
		<title>When Gnome and Firefox Are Dead Slow</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/yYONswdLA0M/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/gnome-firefox-dead-slow/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 22:52:29 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Xorg]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=120</guid>
		<description><![CDATA[I&#8217;ve had Ubuntu Karmic Koala installed on my MacBook Pro Core2Duo for 2-3 weeks now. Almost everything&#8217;s been working perfectly. However, whenever I&#8217;d start a second Gnome session and run Firefox, the machine would slow to a crawl, and X&#8217;s CPU usage would skyrocket..we&#8217;re talking &#62;80% here.
I scoured Google for all sorts of things:

Gnome second [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had Ubuntu Karmic Koala installed on my MacBook Pro Core2Duo for 2-3 weeks now. Almost everything&#8217;s been working perfectly. However, whenever I&#8217;d start a second Gnome session and run Firefox, the machine would slow to a crawl, and X&#8217;s CPU usage would skyrocket..we&#8217;re talking &gt;80% here.</p>
<p>I scoured Google for all sorts of things:</p>
<ul>
<li>Gnome second session is slow</li>
<li>Gnome X is slow</li>
<li>Gnome Xorg is slow</li>
<li>Gnome Firefox slow</li>
<li>X second session is slow</li>
<li>Etc.</li>
</ul>
<p>I found <a title="Ubuntu Bug: Very slow when more then one user is logged in" href="http://www.mail-archive.com/universe-bugs@lists.ubuntu.com/msg154538.html">several</a> <a title="Bug Report: Very slow when more then one user is logged in" href="https://bugs.launchpad.net/ubuntu/+source/meta-gnome2/+bug/474655">other</a> <a title="Bug report: [HD3470] second X session is slow" href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/359092">reports</a> <a title="Bug report: MASTER: no DRI on the second user session" href="https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/297322">of</a> <a title="Bug report: radeonhd, second simultaneous x session is slow" href="http://bugs.freedesktop.org/show_bug.cgi?id=18290">this</a>, but no solutions.</p>
<p>Eventually, I stumbled upon <a title="Blog post: Slow Firefox – High Xorg CPU usage – Debian and Ubuntu – SOLVED" href="http://blog.kelsin.net/2009/02/24/slow-firefox-high-xorg-cpu-usage-debian-and-ubuntu-solved/">this blog post</a>, which purports to have solved the problem. I gave it a shot, and holy shit, it worked!</p>
<p>Just to be verbose, here&#8217;s what I did:</p>
<ol>
<li>Open /etc/X11/xorg.conf .</li>
<li>Add this line to the &#8220;Device&#8221; section:
<pre>Option "AccelMethod" "XAA"</pre>
<p>So my &#8220;Device&#8221; section now looks like this:</p>
<pre>Section "Device"
  Identifier  "Configured Video Device"
  Option      "AccelMethod" "XAA"
EndSection</pre>
</li>
<li>Save the file and log-out of Gnome.</li>
<li>Switch to tty1 by hitting CTRL+ALT+F1 .</li>
<li>Restart GDM:
<pre>$ sudo /etc/init.d/gdm restart</pre>
</li>
</ol>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/yYONswdLA0M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/gnome-firefox-dead-slow/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/gnome-firefox-dead-slow/</feedburner:origLink></item>
		<item>
		<title>Copying Between GNU Screen buffers</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/nfHXtncCHRU/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/copying-gnu-screen-buffers/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 22:06:52 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[GNU Screen]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=67</guid>
		<description><![CDATA[GNU Screen is one of those tools that makes you think &#8220;How the %&#38;@# did I live without this for so long?!&#8221; If you work on command lines regularly, GNU Screen is a must.
In my desktop environment, I run Konsole and Yakuake, with a different Screen session in each[1]. A few days ago, I noticed [...]]]></description>
			<content:encoded><![CDATA[<p>GNU Screen is one of those tools that makes you think &#8220;How the %&amp;@# did I live without this for so long?!&#8221; If you work on command lines regularly, GNU Screen is a must.</p>
<p>In my desktop environment, I run Konsole and <a href="http://en.wikipedia.org/wiki/Yakuake">Yakuake</a>, with a different Screen session in each<a href="#end-note-1">[1]</a>. A few days ago, I noticed that I was using the mouse to copy text between these Screen sessions. How inefficient is that?</p>
<p>It turns out that there&#8217;s a really easy way to copy text between different Screen sessions.</p>
<p>Note: I use CTRL-J as my escape command.</p>
<p>Copy some text to the first Screen&#8217;s buffer, and type <em>^J:writebuf</em> . Now switch to your other Screen session, and type <em>^J:readbuf</em> . Your second Screen session has just grabbed what you copied in your first Screen session. Paste it wherever you want, and Bob&#8217;s your uncle.</p>
<p><a name="end-note-1"></a><span class="end-note">[1] These Screen sessions are different on purpose. My Yakuake session is for &#8220;throw-away&#8221; tasks that don&#8217;t necessarily pertain to any tasks that I&#8217;m currently working on.</span></p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/nfHXtncCHRU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/copying-gnu-screen-buffers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/copying-gnu-screen-buffers/</feedburner:origLink></item>
		<item>
		<title>Linux Mint Is Weird</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/EWrXv60pEHY/</link>
		<comments>http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 01:12:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/</guid>
		<description><![CDATA[I have a MacBook Pro. I bought it back in 2007 when I was living in Australia. It&#8217;s awesome. I love it, especially the keyboard. Unfortunately, Mac OS X has pissed me off way too many times. So I jumped ship to Linux Mint 7.
Out of the box, Mint 7 supports my Mac&#8217;s Atheros wifi [...]]]></description>
			<content:encoded><![CDATA[<p>I have a MacBook Pro. I bought it back in 2007 when I was living in Australia. It&#8217;s awesome. I love it, especially the keyboard. Unfortunately, Mac OS X has pissed me off way too many times. So I jumped ship to Linux Mint 7.</p>
<p>Out of the box, Mint 7 supports my Mac&#8217;s Atheros wifi card <strong>and</strong> ATI video card. That&#8217;s something that not even Ubuntu managed to do. Needless to say, I was impressed.</p>
<p>After installing and configuring most of Mint 7, things were looking pretty good. As some of you know, I customize KDE heavily. Shortcuts, panels, virtual desktops, colour schemes, etc. Once all of that&#8217;s configured as I like it, I don&#8217;t touch&#8217;em: they&#8217;re perfect (for me).</p>
<p>Mint 7 ships with KDE 4 though, which uses Plasma. Trying to get Plasma configured just right is like trying to fine-tune a space ship: it sounds like fun, but it just Ain&#8217;t Gonna Happen <sup>(tm)</sup>.</p>
<p>While trying to configure Plasma, I ran <i>sudo aptitude safe-upgrade</i>, and went to bed. I awoke to hell. Well, desktop hell. None of my panels were showing, the <a href="http://sidux.files.wordpress.com/2009/04/plasma_cashew2.png">Plasma &#8220;cashew&#8221;</a> was missing, and right-clicking on the desktop did nothing. <strong>Fark!</strong></p>
<p>To make a long story short, Steely in #LinuxMint.com on irc.spotchat.org saved me. He corrected my sources.list , and after running mintupdate, life was peachy!</p>
<p>Apparently, one is <strong>not</strong> supposed to use aptitude&#8217;s <i>safe-upgrade</i> tool, because it&#8217;ll install packages that Linux Mint doesn&#8217;t want you to.</p>
<p>How/why/what/?!?</p>
<pre>&lt;steely&gt; mint will fix packages or omit items until they get what they consider a stable base

&lt;steely&gt; mint uses updates levels 1 to 5 and mintupdate is set to use levels 1 to 3 by default, 4 and 5 has kernel and driver and other package updates

&lt;steely&gt; if you use mintupdate you will rarely have problems but if you use the terminal it ignores levels and can introduce packages that conflict with mint's patches / fixes</pre>
<p>
So there you have it. When running Linux Mint, <strong>use <i>mintUpdate</i>, not <i>aptitude</i>, to perform upgrades</strong>.</p>
<p>In case anyone else is plagued by this problem, the solution is to comment out this line in /etc/apt/sources.list :</p>
<pre>deb http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu jaunty main</pre>
<p>and uncomment this line:</p>
<pre>deb http://archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse</pre>
<p>Next, use <i>mintUpdate</i> to upgrade the rest of your packages, reboot, and pray to whichever god(s) you believe in.</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/EWrXv60pEHY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/</feedburner:origLink></item>
		<item>
		<title>Idiosynchracy With Apache Rewrites</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/tgtsuLVvawI/</link>
		<comments>http://cretaceouslabs.com/blog/2009/09/idiosynchracy-with-apache-rewrites/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 15:04:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/2009/09/idiosynchracy-with-apache-rewrites/</guid>
		<description><![CDATA[Did you know that it&#8217;s not possible to apply an Apache rewrite condition to multiple rewrite rules? I thought this would work, but requests from every IP address were being redirected:
RewriteCond %{REMOTE_ADDR} ^10\.0\.10\.10$
RewriteRule ^uploads/(.*)$ /wp-content/uploads/$1
RewriteRule (.*) http://deadorange.com/blog$1 [L,R=301]
It turns out that RewriteCond directives only apply to the following RewriteRule. So my rewrite directives above were [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that it&#8217;s not possible to apply an Apache rewrite condition to multiple rewrite rules? I thought this would work, but requests from every IP address were being redirected:</p>
<pre>RewriteCond %{REMOTE_ADDR} ^10\.0\.10\.10$
RewriteRule ^uploads/(.*)$ /wp-content/uploads/$1
RewriteRule (.*) http://deadorange.com/blog$1 [L,R=301]</pre>
<p>It turns out that RewriteCond directives only apply to the following RewriteRule. So my rewrite directives above were equivalent to &#8220;If the request came from 10.0.10.10, rewrite /uploads/.* to /wp-content/uploads/.* .Next, redirect everyone to http://deadorange.com/blog$1 .&#8221;<br />
<br />Unfortunately, the only solution is to repeat the condition:</p>
<pre>RewriteCond %{REMOTE_ADDR} ^10\.0\.10\.10$
RewriteRule ^uploads/(.*)$ /wp-content/uploads/$1
RewriteCond %{REMOTE_ADDR} ^10\.0\.10\.10$
RewriteRule (.*) http://deadorange.com/blog$1 [L,R=301]</pre>
<p>That isn&#8217;t very <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY</a>, but if it&#8217;s the only way, we have to live with it!</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/tgtsuLVvawI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/09/idiosynchracy-with-apache-rewrites/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/09/idiosynchracy-with-apache-rewrites/</feedburner:origLink></item>
		<item>
		<title>Importing large WordPress blogs</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/CZSRDGuHjVs/</link>
		<comments>http://cretaceouslabs.com/blog/2009/09/importing-large-wordpress-blogs/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:26:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/2009/09/importing-large-wordpress-blogs/</guid>
		<description><![CDATA[I just finished importing a WordPress blog with >1500 posts into a different WordPress blog. Importing the posts succeeded, but the last few steps at the end failed, like recalculating how many posts are in each category. This happened because the page always timed out; the import took more than 10 minutes.
If you find yourself [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished importing a WordPress blog with >1500 posts into a different WordPress blog. Importing the posts succeeded, but the last few steps at the end failed, like recalculating how many posts are in each category. This happened because the page always timed out; the import took more than 10 minutes.</p>
<p>If you find yourself with this problem, the fix is easy:
<ol>
<li>First, comment out the following line in wp-admin/import/wordpress.php . In WordPress 2.8.4, it&#8217;s line 367.
<pre>set_time_limit( 60 );</pre>
</li>
<p> 
<li>Configure your web server to allow PHP scripts to execute for a long time. In Apache, you do that with the &#8220;Timeout&#8221; directive:
<pre>Timeout 6000</pre>
<p>This can be put within a specific virtual host, or configured globally.</li>
<p> 
<li>Increase PHP&#8217;s max execution time. This is done with the &#8220;max_execution_time&#8221; setting in the appropriate php.ini :
<pre>max_execution_time = 600    ; Maximum execution time of each script, in seconds</pre>
<p>or within your web server&#8217;s configuration, if that&#8217;s allowed. For example, within Apache, you include this globally, or within a virtual host:
<pre>&lt;IfModule mod_php5.c&gt;  php_value max_execution_time 6000&lt;/IfModule&gt;</pre>
</li>
<p></ol>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/CZSRDGuHjVs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/09/importing-large-wordpress-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/09/importing-large-wordpress-blogs/</feedburner:origLink></item>
	</channel>
</rss>
