<?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>MidnightReign.org</title>
	<atom:link href="http://www.midnightreign.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.midnightreign.org</link>
	<description>Incoherent Keyboard Bashing</description>
	<lastBuildDate>Wed, 18 Aug 2010 14:29:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Raging at Ruby on Rails</title>
		<link>http://www.midnightreign.org/2010/08/18/raging-at-ruby-on-rails/</link>
		<comments>http://www.midnightreign.org/2010/08/18/raging-at-ruby-on-rails/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 14:29:41 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=951</guid>
		<description><![CDATA[Rail Road from Crestock Stock Images As usual, I have been bored (not that there&#8217;s a lack of things to do &#8211; but one requires stimulation &#8211; and not in the sexual kind of way, although I definitely wouldn&#8217;t say no), so I decided to look at Ruby on Rails.  Admittedly I&#8217;m probably a complete [...]]]></description>
			<content:encoded><![CDATA[<div class="crestock-img" style="margin: 1em; display: block;">
<div><dl class="wp-caption alignright" style="width: 365px;"> <dt class="wp-caption-dt"><img title="Rail road tracks crossing each other" src="/wp-content/uploads/crestockimages/338052-ms.jpg" alt="Rail road tracks crossing each other" width="354" height="236" /></dt> <dd class="wp-caption-dd crestock-img-attribution" style="font-size: 0.8em;"><a href="http://www.crestock.com/image/338052-Rail-Road.aspx">Rail Road</a> from <a href="http://www.crestock.com">Crestock Stock Images</a></dd> </dl></div>
</div>

<p>As usual, I have been bored (not that there&#8217;s a lack of things to do &#8211; but one requires <em>stimulation</em> &#8211; and not in the sexual kind of way, although I definitely wouldn&#8217;t say no), so I decided to look at Ruby on Rails.  Admittedly I&#8217;m probably a complete moron when it comes to looking things up, per se, but I battled to find decent beginner information on rails, and ruby and how everything fits together in the scheme of things. Sure, there are ruby tutorials, and rails tutorials, but I just couldn&#8217;t find anything that actually made sense to my warped frame of mind. I did quite a bit of googling, clicking on links from rubyonrails.org and ruby-lang.org, and reading of pages and such.  I even subscribed to some podcasts.</p>

<p>Eventually I figured out that Phusion Passenger was the correct way to run Rails applications on Apache, so I looked into installing that.  Unfortunately Phusion passenger requires apache2-mpm-worker which allows apache to use multiple threads. It completely replaces apache2-mpm-prefork, the default non-threaded model which the apache php5 module requires. And since everything on my web server is php based, this presented a problem. Fortunately it&#8217;s not a <em>huge</em> problem, as the workaround is to set up php5-cgi using FastCGI, which actually has more pros than cons. It&#8217;s definitely a better way to run php &#8211; the speed boost was definitely noticeable to me, and I didn&#8217;t pick up any issues with any of the sites.  Fortunately it didn&#8217;t take me too long to convert the sites to use FastCGI. Downtime was less than 5 minutes.</p>

<p>I then installed ruby, and rails from the stock repositories. Turns out this wasn&#8217;t a great idea, as by default it was ruby 1.8&#8230; and I&#8217;m obsessed with using the latest version of things. So I installed ruby 1.9. Then I discovered that it still wasn&#8217;t the latest, and it wasn&#8217;t in the repository.  So I upgraded my server OS to the latest release. And it had ruby 1.9.1. And even that patch level wasn&#8217;t even close to the latest version.</p>

<p>In the mean time, I found http://railstutorial.org. The newest tutorial deals with Rails 3.0, which is currently at version 3.00rc, and when you install that version of rails, it warns you that it may not function correctly with version 1.9.1 and to rather install 1.9.2 when it was released. Fan-bloody-tastic. I went ahead anyway, but had some issues getting the app to run properly. I kept getting odd errors, and there were messages about the app not finding certain gems that were, in fact, installed. It was painful.</p>

<p>So I figured, what the hell. I&#8217;d remove the OS-provided ruby and all the little bits and bobs, and I would compile ruby from scratch, and install it using checkinstall, so I could at least remove it.</p>

<p>I grabbed the most recent version (1.9.1p429 at the time) off ruby-lang.org, and tried to compile it, but received a compiler error. Googling told me I should try doing make optflags=-O3. That worked, but I got another error further along. Googling again told me that I should try running ./configure &#8211;enable-shared. So I did, and I ended up with a compiled ruby. I ran make install via checkinstall, and I was happy.</p>

<p>Actually, not. For some reason I checked the ruby-lang site, and discovered that the latest patch release was now 1.9.1.p430. What the&#8230;? It had been p429 just minutes ago, I swear!  I even thought that maybe I had actually downloaded p430, but the internal version number perhaps hadn&#8217;t changed&#8230; but I checked the downloaded archive, and it was definitely p429, the version.h said so.  So I downloaded the p430 archive, checked the version.h &#8211; it&#8217;s patch level 430. So I compile it. I run ./ruby -v. It returns 1.9.1-429.</p>

<p>Now I was incredibly confused. I grab the nightly snapshot. The version.h says it is version 1.9.3. Compile it, and run ./ruby -v. Also version 1.9.1-429.</p>

<p>I realised that it must be reading something from the installed version of ruby, so I remove it, and run ./ruby -v.  It returns an error about not finding libruby-1.9.1.so.</p>

<p>After a lot of thinking and considering, I decided that my best plan of action would be to grab a nightly build, and setup a package build via checkinstall. So I did just that. Although I think after this whole exercise, I&#8217;ve compiled ruby about 20 times now. But at least I now have a decent script that pretty much automates the getting, compiling and building of the package.</p>

<p>And I have a test site gurgling quite nicely under phusion passenger (mod<em>rails/mod</em>rack).</p>

<p>Of course, I&#8217;m leaving out a fair amount of detail about researching other frameworks and testing those out. The swearing about getting passenger to do what the docs say it should do (the OS-distro of it was old. Typical), and that kind of thing.  At least now I should hopefully be in a position to start actually learning how to use Rails via that tutorial I mentioned earlier.</p>

<p>Maybe.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/08/18/raging-at-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bah! Werewolves</title>
		<link>http://www.midnightreign.org/2010/08/15/bah-werewolves/</link>
		<comments>http://www.midnightreign.org/2010/08/15/bah-werewolves/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 22:43:21 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=946</guid>
		<description><![CDATA[I hate movies / tv series that depict werewolves as actual wolves. How boring. I much prefer the half man half beast type creature of popular monster movies.]]></description>
			<content:encoded><![CDATA[<p>I hate movies / tv series that depict werewolves as actual wolves. How boring. I much prefer the half man half beast type creature of popular monster movies.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/08/15/bah-werewolves/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware of the domain scams&#8230;</title>
		<link>http://www.midnightreign.org/2010/05/21/beware-of-the-domain-scams/</link>
		<comments>http://www.midnightreign.org/2010/05/21/beware-of-the-domain-scams/#comments</comments>
		<pubDate>Fri, 21 May 2010 13:54:34 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=943</guid>
		<description><![CDATA[Back in 2004, I wrote about a company doing domain scams &#8211; trying to scare people into thinking that someone else was trying to register domain names that are similar to their own. It seems this practise has become very popular, as I am seeing many of these types of scams going through various mail [...]]]></description>
			<content:encoded><![CDATA[<p>Back in <a href="http://www.midnightreign.org/2004/07/30/funny-thing-scammers/">2004</a>, I wrote about a company doing domain scams &#8211; trying to scare people into thinking that someone else was trying to register domain names that are similar to their own. It seems this practise has become very popular, as I am seeing many of these types of scams going through various mail systems. &nbsp;I try block them where I can, but you can&#39;t stop em all. They mostly seem to originate from China these days.</p>

<p></p><p>So, just be warned, that if you get an email from some company &#8211; particularly from China &#8211; that &quot;someone&quot; is trying to register your &quot;intellectual property&quot; (as they tend to call it), just delete it. It&#39;s a scam to try get you to register domain names that you don&#39;t need at incredibly high prices. &nbsp;Personally, I usually respond with a &#39;Fuck off&#39;, but that&#39;s just me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/05/21/beware-of-the-domain-scams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VirtualBox &#8211; Cloning Ubuntu (or Debian) based image issues</title>
		<link>http://www.midnightreign.org/2010/04/21/virtualbox-cloning-ubuntu-or-debian-based-image-issues/</link>
		<comments>http://www.midnightreign.org/2010/04/21/virtualbox-cloning-ubuntu-or-debian-based-image-issues/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 06:40:37 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[guest additions]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=938</guid>
		<description><![CDATA[In the interest of having this information somewhere handy: Firstly, to successfully install VirtualBox Guest Additions within a server based image: sudo apt-get install dkms build-essential linux-headers-uname -r I discovered that if you clone an ubuntu server based image, networking stops functioning in the clone. The reason for this is that the new Machine assigns [...]]]></description>
			<content:encoded><![CDATA[<p>In the interest of having this information somewhere handy:<br />
Firstly, to successfully install VirtualBox Guest Additions within a server based image:</p>

<p></p><p><code>sudo apt-get install dkms build-essential linux-headers-</code><code>uname -r</code></p>

<p>I discovered that if you clone an ubuntu server based image, networking stops functioning in the clone.<br />
The reason for this is that the new Machine assigns a new MAC address to the NIC. So the Udev rules think it&#39;s a new card, and assign it a new device id, like eth1, or eth2, etc.</p>

<p></p><p>To prevent this from happening, in your base image, edit /lib/udev/rules.d/75-persistent-net-generator.rules</p>
<p>Search for &#39;xen&#39;, and you&#39;ll see a block about ignoring the Xen virtual interfaces. Add the following below it:</p>
<p><code> # ignore VirtualBox virtual interfaces
    ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"
</code></p>
<p>Save it, and then remove the file /etc/udev/rules.d/70-persistent-net.rules.</p>
<p>Do the same thing in any cloned images with broken networking, and reboot the VMs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/04/21/virtualbox-cloning-ubuntu-or-debian-based-image-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Box &#8211; Compacting Images</title>
		<link>http://www.midnightreign.org/2010/04/16/virtual-box-compacting-images/</link>
		<comments>http://www.midnightreign.org/2010/04/16/virtual-box-compacting-images/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:01:38 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[compact]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=933</guid>
		<description><![CDATA[NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &#8211; this is aimed at NTFS based images. You&#39;ve been messing about in your VM, installing and removing software, etc. Your disk space usage inside your machine says [...]]]></description>
			<content:encoded><![CDATA[<p>NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &ndash; this is aimed at NTFS based images.</p>

<p></p><p>You&#39;ve been messing about in your VM, installing and removing software, etc. Your disk space usage inside your machine says you&#39;ve only used 3Gb of disk space, yet your actual image is much bigger. How do you fix it?</p>
<p>It&#39;s fairly simple to fix. First, you should probably remove all the unnecessary crap that you never use. There&#39;s a bunch of utilities out there that can help you with this.</p>
<p>Defrag your drive using your favourite defragger.</p>
<p>Now you will need one of two possible utilities (There may be more, but these are the ones I&#39;m aware of):</p>
<ul>
    <li>SDelete from http://www.sysinternals.com &#8211; this is a tiny 47kb executable.</li>
    <li>Precompact.iso &#8211; Obtained from Microsoft Virtual Server installation (May be available in other MS VM products)</li>
</ul>
<p>Precompact.iso is MUCH easier to use. All you need to do is mount the ISO inside your VM, and it will prepare your disk for compaction.</p>
<p>SDelete is only marginally more difficult. Run it in a command prompt like so: SDelete -c C:<br />
    (or use whatever drive letter you want to compact). SDelete will write zeroes to the free space on your drive image. This allows compaction to take place properly.&nbsp; Note &#8211; this is exactly what the Precompact.iso does, just without the fancy Windows GUI progress bar.</p>
<p>As soon as Precompact or SDelete is finished, shut down the VM.</p>
<p>Open command prompt on your host machine, and navigate to the folder where your hard disk images are located.</p>
<p>NOTE: It&#39;s probably MUCH easier to have the path to Virtual Box set in your PATH statement, otherwise you have to specify the full path to VBoxManage every time you use it.</p>
<p>In the command prompt, run:</p>
<code><path to VirtualBox>\VBoxManage modifyhd "Name Of Image.vdi" --compact</path></code>
<p>Your disk image will now be compacted, and should end up quite a bit smaller than it was.<br />
    If you get an error about the disk image not being found blah blah, specify the FULL path to the image, like so:</p>
<code><path to VirtualBox>\VBoxManage modifyhd "C:\Users\Username&#46;VirtualBox\HardDisks\Name of Image.vdi" --compact</path></code>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/04/16/virtual-box-compacting-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Box &#8211; Resizing Disk Images</title>
		<link>http://www.midnightreign.org/2010/04/16/virtual-box-resizing-disk-images/</link>
		<comments>http://www.midnightreign.org/2010/04/16/virtual-box-resizing-disk-images/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 12:42:21 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=931</guid>
		<description><![CDATA[NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &#8211; this is aimed at NTFS based images, but the basic principles should still work fine for other OS&#39;s. Like a tool, and not thinking ahead, I created [...]]]></description>
			<content:encoded><![CDATA[<p>NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &#8211; this is aimed at NTFS based images, but the basic principles should still work fine for other OS&#39;s.</p>

<p></p><p>Like a tool, and not thinking ahead, I created an XP Base dynamic image of max 10gb in size.&nbsp; While this is usually enough space to mess around with things, I find it can be a pain in the backside when you want to install a sizeable program &#8211; say Visual Studio. While possible, you end up with very little disk space left over at the end of the day.</p>
<p>A possible solution to this dilemma would be to simply add a new disk to the machine, as needed. However, I like making things difficult for myself, so I rather wanted to resize the initial disk.&nbsp; Unfortunately this is not possible with the provided VBoxManage utility. So, you need to jump through a few hoops, but it&#39;s really not that difficult.</p>
<p>You will need:</p>
<ul>
    <li>Clonezilla &#8211; http://clonezilla.org</li>
    <li>GParted &#8211; http://sourceforge.net/projects/gparted/</li>
</ul>
<p>Download the ISO versions &#8211; and for Clonezilla &#8211; DO NOT download the &quot;Alternate&quot; version, it will NOT work.</p>
<p>Using the Virtual Media Manager, create a new dynamic disk of your desired larger size. Call it whatever you like.<br />
    While you are there, add the CloneZilla and GParted iso&#39;s to the CD/DVD library.<br />
    Create a new VM, but do not attach any disks to it. Configure it as Linux, Debian. I called mine Clone Master.<br />
    Edit the VM settings, go to the Storage node, and add a new hard disk. Select your SOURCE disk (The disk&nbsp; you want to enlarge). Add another hard disk, and select the DESTINATION disk (the big image you just created). Click the CD node, and select the clonezilla image. Boot the new VM.</p>
<p>The CloneZilla CD should now boot (If it doesn&#39;t, check the boot priority in your VM settings, and make sure CD is set to boot first).<br />
    <br />
    <br />
    Use the utility to do a local disk to disk clone. Using &quot;beginner&quot; mode is fine.&nbsp; The &quot;expert&quot; mode has a setting to extend the partition to the size of the destination disk, but it didn&#39;t work for me at all &#8211; the cloned partition was the original size. Not sure if it&#39;s because of the NTFS partitions, or a bug in the version I was using. If it works for you then EXCELLENT &#8211; you won&#39;t need to do the GParted segment.<br />
    &nbsp;</p>
<p>Once you have cloned the disk, power off the cloning VM, edit the settings, and detach the hard disks from it. Attach the newly cloned bigger image to your original VM, or create a new VM for it, and boot it. Check that the system works ok. If the partition hasn&#39;t grown to fill the new partition, you will need to continue to the next step.</p>
<p>Shut down the VM with the new large image.<br />
    Edit the settings of your cloning VM, set the CD to use the GParted iso, and attach the newly cloned image to the machine.<br />
    Boot the machine, and GParted should load. Just accept default settings, and eventually X-Windows will load with a copy of GParted. Click the extend button, and increase the partition to fill the disk. Apply the changes. It will only take a few seconds to completed. Exit the system, and shut down the VM. Edit the VM settings, and detach the disks (It&#39;s not strictly necessary &#8211; more of a safety measure).</p>
<p>Boot your previous VM to test the disk. All should be good.<br />
    &nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/04/16/virtual-box-resizing-disk-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chat Splat</title>
		<link>http://www.midnightreign.org/2010/03/24/chat-splat/</link>
		<comments>http://www.midnightreign.org/2010/03/24/chat-splat/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 11:57:51 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/2010/03/24/chat-splat/</guid>
		<description><![CDATA[This took place on GTalk a moment ago: 1:36 PM Alexander: i know i know ok 1:37 PM so this thing works very well now it's a question of playing with it and test it with posterous me: the more you play with it the harder it gets Alexander: well, up to a point WHAT?! [...]]]></description>
			<content:encoded><![CDATA[<p>This took place on GTalk a moment ago:
<pre>
1:36 PM Alexander: i know
i know
ok
1:37 PM so this thing works very well
now it's a question of playing with it
and test it with posterous
me: the more you play with it the harder it gets
Alexander: well, up to a point
WHAT?!
NO!!1
me: ROFL
1:39 PM Alexander: uncool
</pre></p>

<p>Damnit. What is it with these damn themes that keep fucking up the formatting?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/03/24/chat-splat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
