<?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"
	>

<channel>
	<title>/usr/bin/pwn</title>
	<atom:link href="http://jbhannah.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://jbhannah.net</link>
	<description>As a last resort, in case you would otherwise have to.</description>
	<pubDate>Wed, 27 Aug 2008 21:27:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>I should write here more often, huh</title>
		<link>http://jbhannah.net/2008/08/27/i-should-write-here-more-often-huh/</link>
		<comments>http://jbhannah.net/2008/08/27/i-should-write-here-more-often-huh/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 21:27:43 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[Games]]></category>

		<category><![CDATA[School]]></category>

		<category><![CDATA[Travel]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[calculus]]></category>

		<category><![CDATA[Japanese]]></category>

		<category><![CDATA[laptop]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Neverwinter Nights]]></category>

		<category><![CDATA[physics]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[vacation]]></category>

		<category><![CDATA[Vista]]></category>

		<category><![CDATA[VMWare]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=136</guid>
		<description><![CDATA[New theme. Woohoo.
The semester has apparently started, seeing as how I&#8217;m writing this while working on a lab in physics. I&#8217;m taking 16 credit hours this semester, in four classes:

Japanese 102 (5 credits)
Physics 151 (4 credits)
Calculus 3 (Math 272, 4 credits)
Technology and Society (Sociology 334, 3 credits)

I was originally registered in Japanese 101; even though [...]]]></description>
			<content:encoded><![CDATA[<p>New theme. Woohoo.</p>
<p>The semester has apparently started, seeing as how I&#8217;m writing this while working on a lab in physics. I&#8217;m taking 16 credit hours this semester, in four classes:</p>
<ul>
<li>Japanese 102 (5 credits)</li>
<li>Physics 151 (4 credits)</li>
<li>Calculus 3 (Math 272, 4 credits)</li>
<li>Technology and Society (Sociology 334, 3 credits)</li>
</ul>
<p>I was originally registered in Japanese 101; even though I&#8217;d taken up to 202, there was a two-semester gap between when I took 201 and 202, and another two-semester gap since when I took 202, and both 201 and 202 were taken on top of a full load of classes in high school, so I didn&#8217;t feel like my actual level of ability was much higher than 101. But the teacher wanted me to take the placement assessment, and I ended up in 102 anyway. At least I&#8217;m not totally bored or totally lost, so I guess I&#8217;m in the right place now.</p>
<p>My actual schedule is what impresses me: I have all four classes on Monday, Wednesday, and Friday, with physics, Japanese, and calculus all in the morning and early afternoon, then a few hours&#8217; break before Tech and Society; Tuesday I only have Japanese and calculus, and Thursday I only have Japanese. I think I&#8217;ve achieved the perfect balance of workload, class load and free time.</p>
<p>I&#8217;ve replaced Windows XP on the designated Boot Camp hard drive in my Mac Pro with Vista Business 64-bit on about 500GB of it; the other 200GB (it&#8217;s a &#8220;750GB&#8221; drive, with about 698GB usable) I plan to use for Ubuntu 64-bit. This is partially so that I can play a legal, less-buggy version of Halo 2 on my computer (Vista), so that Windows can use all 4GB of RAM in my computer (64-bit), and so that I can jus have another Linux installation handy (Ubuntu). How I did the Vista installation was interesting, though; I (ahem) otherwise acquired an unmodified, uncracked Vista 64-bit installation disc, and installed it first on a VMWare virtual machine without activating it using the Vista Business license on the label on the bottom of my laptop, which hasn&#8217;t been used since I got the laptop last April (I almost immediately wiped it completely off in favor of Ubuntu). It installed and updated fine in the virtual machine, and I deemed the media safe to use on a live system, so I then successfully installed it on the partition I made for Windows. The only thing was I had to activate it by phone, but the automated phone activation system worked fine. I haven&#8217;t been able to get Neverwinter Nights to run yet, but other than that no problems so far (knock on wood) other than the fact that I may just have too many computer games.</p>
<p>(Finishing up in the Society of Physics Students room before my last class today.) Other than school, pretty much just random stuff going on. My best friend Rebecca now has a <a href="http://beccainbloom.blogspot.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://beccainbloom.blogspot.com/');">blog of her own</a>, which of course I would say is worth checking out; and I will be uploading my vacation pictures soon, I just need to settle on how thoroughly to go through and edit and index them. Of course, there&#8217;s still the high probability of games intervening&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/08/27/i-should-write-here-more-often-huh/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flickr and furniture</title>
		<link>http://jbhannah.net/2008/08/14/flickr-and-furniture/</link>
		<comments>http://jbhannah.net/2008/08/14/flickr-and-furniture/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 21:27:22 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[School]]></category>

		<category><![CDATA[Travel]]></category>

		<category><![CDATA[condo]]></category>

		<category><![CDATA[Flickr]]></category>

		<category><![CDATA[furniture]]></category>

		<category><![CDATA[photos]]></category>

		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=90</guid>
		<description><![CDATA[I&#8217;ve started using Flickr for online photo sharing and backup, partially influenced by the fact that I took almost 600 photos on vacation and don&#8217;t want to put the stress of uploading gigabytes of images on my server. I did have to spring for Flickr Pro, which is an extra $25/year, because the 100MB/month upload [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started using <a href="http://www.flickr.com/photos/jbhannah/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/');">Flickr</a> for online photo sharing and backup, partially influenced by the fact that I took almost 600 photos on vacation and don&#8217;t want to put the stress of uploading gigabytes of images on my server. I did have to spring for Flickr Pro, which is an extra $25/year, because the 100MB/month upload limit on a free account was too small, but I asked around and the general response was that it&#8217;s definitely worth it. Currently I&#8217;m using a trial version of <a href="http://www.apple.com/aperture/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.apple.com/aperture/');">Aperture</a> to sort through and edit my vacation pictures, and as I finish with each day&#8217;s pictures I&#8217;ll upload them to my photostream (with <a href="http://connectedflow.com/flickrexport/aperture/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://connectedflow.com/flickrexport/aperture/');">FlickrExport for Aperture</a>) and post them here.</p>
<p>In addition to mass quantities of photos, I now also have real furniture. My grandmother and I made a trip to Ikea one afternoon and I got a dresser, a TV stand and a bookcase; unfortunately my roommates were both gone when I got back, so I had to carry the boxes all in by myself. A little rearranging was needed to get everything inside and have room to assemble it:</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757894776/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757894776/');"><img src="http://farm4.static.flickr.com/3132/2757894776_51bfb72ac5.jpg" border="0" alt="Boxes" width="500" height="375" /></a></p>
<p>The TV stand was the first thing I put together, and definitely took the longest.</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757895586/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757895586/');"><img src="http://farm4.static.flickr.com/3007/2757895586_ea23b314d0.jpg" border="0" alt="TV stand 1" width="500" height="375" /></a></p>
<p>It does look pretty cool though, and lets me keep all the cables for everything neatly out of sight.</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757896292/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757896292/');"><img src="http://farm4.static.flickr.com/3196/2757896292_54c4458365.jpg" border="0" alt="TV stand 2" width="375" height="500" /></a></p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757062931/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757062931/');"><img src="http://farm4.static.flickr.com/3282/2757062931_2a405070fc.jpg" border="0" alt="TV stand 3" width="375" height="500" /></a></p>
<p>My tentative setup, before I&#8217;d assembled the dresser:</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757897630/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757897630/');"><img src="http://farm4.static.flickr.com/3023/2757897630_cb6f9a0306.jpg" border="0" alt="TV stand 4" width="500" height="375" /></a></p>
<p>Only minor injuries were sustained in the entire process. My arm was rather bruised after carrying in all of the boxes:</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757898338/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757898338/');"><img src="http://farm4.static.flickr.com/3004/2757898338_837f13fa81.jpg" border="0" alt="Arm" width="375" height="500" /></a></p>
<p>While building the TV stand I dropped one of the back panels on my finger, but other than that I managed to get everything assembled and remain unscathed.</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757899042/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757899042/');"><img src="http://farm4.static.flickr.com/3069/2757899042_c4a63d3f0a.jpg" border="0" alt="Finger" width="500" height="375" /></a></p>
<p>Next was the dresser a few days later—considerably easier to build than the TV stand.</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757065577/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757065577/');"><img src="http://farm4.static.flickr.com/3055/2757065577_c01dbc1834.jpg" border="0" alt="Dresser" width="500" height="375" /></a></p>
<p>The finished product:</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2763007649/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2763007649/');"><img src="http://farm4.static.flickr.com/3274/2763007649_401ca87fc7.jpg" border="0" alt="Dresser 2" width="375" height="500" /></a></p>
<p>The finished setup for my electronics: TV and speakers on the TV stand of course, cable box and modem on one of the shelves below, and stereo receiver and router on the dresser.</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2757066453/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2757066453/');"><img src="http://farm4.static.flickr.com/3173/2757066453_97979690ff.jpg" border="0" alt="Setup" width="500" height="375" /></a></p>
<p>It was another several days before I got the bookshelf put together; a cold, my general laziness and the fact that there was still lots of stuff on the floor in my room intervened, but I did finally get it put together. It was by far the easiest to assemble; the instructions actually said one person could do it, and I did it while fighting off a nasty cold.</p>
<p><a class="tt-flickr tt-flickr-Medium" href="http://www.flickr.com/photos/jbhannah/2763852214/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/jbhannah/2763852214/');"><img src="http://farm4.static.flickr.com/3134/2763852214_428e5f7fdf.jpg" border="0" alt="Bookcase" width="375" height="500" /></a></p>
<p>Like I said, I&#8217;ve been fighting off a cold for most of this week. Yesterday was definitely the worst of it, but I&#8217;m on my way back to being healthy. I even did the dishes, which my roommates are too lazy to take care of—while sick. By hand (with hand sanitizer on hand). Take note, ladies.</p>
<p>I&#8217;m kind of giving the <a href="http://www.dannychoo.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.dannychoo.com');">Danny Choo</a> photoblogging style a shot here. Probably won&#8217;t be a regular thing, but I&#8217;ll at the very least post thumbnails or links to new photosets if I have more than just a handful of pictures to share.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/08/14/flickr-and-furniture/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Forecast for Tempe: hot; slightly cooler in nearby Hades</title>
		<link>http://jbhannah.net/2008/08/07/forecast-for-tempe-hot-slightly-cooler-in-nearby-hades/</link>
		<comments>http://jbhannah.net/2008/08/07/forecast-for-tempe-hot-slightly-cooler-in-nearby-hades/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 07:46:58 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[Travel]]></category>

		<category><![CDATA[baseball]]></category>

		<category><![CDATA[California Adventure]]></category>

		<category><![CDATA[Diamondbacks]]></category>

		<category><![CDATA[Disneyland]]></category>

		<category><![CDATA[Dodgers]]></category>

		<category><![CDATA[earthquake]]></category>

		<category><![CDATA[ESPN]]></category>

		<category><![CDATA[Los Angeles]]></category>

		<category><![CDATA[Muppets]]></category>

		<category><![CDATA[restaurant]]></category>

		<category><![CDATA[Simpsons]]></category>

		<category><![CDATA[sports]]></category>

		<category><![CDATA[Tempe]]></category>

		<category><![CDATA[Tucson]]></category>

		<category><![CDATA[Universal Studios]]></category>

		<category><![CDATA[vacation]]></category>

		<category><![CDATA[weather]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=85</guid>
		<description><![CDATA[All things other than the weather considered it&#8217;s good to be back in Tempe, on my own computer again with my anime collection and epic internet pipes and digital cable.
But DANG it gets hot here. Seriously, holy frick.
In any case, vacation was fun. Lots of driving on Monday (yes, we drove from Tucson to LA, [...]]]></description>
			<content:encoded><![CDATA[<p>All things other than the weather considered it&#8217;s good to be back in Tempe, on my own computer again with my anime collection and epic internet pipes and digital cable.</p>
<p>But DANG it gets hot here. Seriously, holy frick.</p>
<p>In any case, vacation was fun. Lots of driving on Monday (yes, we drove from Tucson to LA, in the daytime); stayed at the Residence Inn by Marriott in Los Alamitos. Tuesday, Disneyland; we had a reservation at the Blue Bayou Restaurant there, which was well-timed with the earthquake happening not long before. We didn&#8217;t feel anything, but all the rides were closed for inspection for a couple hours. We didn&#8217;t go on too many rides anyway; this was the third time in just over four years (second time with my family) that we&#8217;d been to Disneyland, so I think it was all still old news right then. Another year or two&#8217;s wait might have been better.</p>
<p>Wednesday, California Adventure; pretty good, it was my first time going. Muppets 3D was definitely the highlight of the day; the Animation Workshop was interesting too, and the Monsters, Inc. and Soaring Over California rides were pretty good. Then ESPNZone in Downtown Disney that night for dinner. There are televisions at eye-level above the urinals there. Best restaurant of the trip.</p>
<p>Thursday, a bunch of different things: Aquarium of the Pacific in the morning; Seal Beach in the afternoon; and Dodger Stadium, believe it or not my first Major League Baseball regular-season game outside of Phoenix, in the evening. We were in the vast minority of people not wearing any Dodger Blue, and I didn&#8217;t see anyone wearing anything Diamondbacks (even though the D-backs won, 2-1). I did have a Dodger Dog though&#8230;you have not tasted an excellent hot dog until you&#8217;ve had a Dodger Dog with the works.</p>
<p>Friday, Universal Studios. Much smaller than Disneyland actually, which I wasn&#8217;t expecting but much to the delight of my legs. The tour is really the highlight of the park; it&#8217;s half real sightseeing, half totally contrived (but passingly fun) theme park fun-tram ride, but fun nonetheless. We opted to pass on The Mummy Returns and Jurassic Park rides; the Shrek 4D show was amusing, the special effects demonstrations were enlightening despite being punctuated by really dry attempts at humor, and the Simpsons Ride was totally worth the 45-minute wait spent watching an about as long Simpsons &#8220;Best of Krustyland&#8221; video loop.</p>
<p>Saturday, more driving. All in all I took a good several hundred photos, which I still have to get into iPhoto and sort out the good ones before uploading them, but I&#8217;ll probably get working on that after I (finally) get some furniture and clean my room.</p>
<p>Oh yes, and it was much—MUCH—cooler in Los Angeles.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/08/07/forecast-for-tempe-hot-slightly-cooler-in-nearby-hades/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Lost in computation</title>
		<link>http://jbhannah.net/2008/08/03/lost-in-computation/</link>
		<comments>http://jbhannah.net/2008/08/03/lost-in-computation/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 04:20:27 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Chinese]]></category>

		<category><![CDATA[epic]]></category>

		<category><![CDATA[internet]]></category>

		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=83</guid>
		<description><![CDATA[Forget translation; this restaurant sign in China didn&#8217;t even make it that far, and shows why you really shouldn&#8217;t rely on the internet for translating into languages you can&#8217;t read:

I don&#8217;t post just plain links very much, but when I find one that reaches as far into the realm of Epic as this I just [...]]]></description>
			<content:encoded><![CDATA[<p>Forget translation; this <a href="http://adweek.blogs.com/adfreak/2008/07/then-well-grab.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://adweek.blogs.com/adfreak/2008/07/then-well-grab.html');">restaurant sign in China</a> didn&#8217;t even make it that far, and shows why you really shouldn&#8217;t rely on the internet for translating into languages you can&#8217;t read:</p>
<p><img class="aligncenter" title="http://adweek.blogs.com/adfreak/images/2008/07/10/translateservererror.jpg" src="http://adweek.blogs.com/adfreak/images/2008/07/10/translateservererror.jpg" alt="" width="370" height="278" /></p>
<p>I don&#8217;t post just plain links very much, but when I find one that reaches as far into the realm of Epic as this I just can&#8217;t help it. I don&#8217;t even know how to categorize this.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/08/03/lost-in-computation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Vacation days</title>
		<link>http://jbhannah.net/2008/07/25/vacation-days/</link>
		<comments>http://jbhannah.net/2008/07/25/vacation-days/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 21:31:43 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[Games]]></category>

		<category><![CDATA[Travel]]></category>

		<category><![CDATA[condo]]></category>

		<category><![CDATA[driving]]></category>

		<category><![CDATA[EVE Online]]></category>

		<category><![CDATA[family]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Los Angeles]]></category>

		<category><![CDATA[openSUSE]]></category>

		<category><![CDATA[Phoenix]]></category>

		<category><![CDATA[San Diego]]></category>

		<category><![CDATA[summer school]]></category>

		<category><![CDATA[Tucson]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[vacation]]></category>

		<category><![CDATA[World of Warcraft]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=71</guid>
		<description><![CDATA[My family is taking a vacation to the Los Angeles area next week; so for the time being I&#8217;m back in the Old Pueblo. The two things I remembered right away:

how little traffic there is, but how much it doesn&#8217;t seem like it because of how poorly managed it is; and
how little there is to [...]]]></description>
			<content:encoded><![CDATA[<p>My family is taking a vacation to the Los Angeles area next week; so for the time being I&#8217;m back in the Old Pueblo. The two things I remembered right away:</p>
<ol>
<li>how little traffic there is, but how much it doesn&#8217;t seem like it because of how poorly managed it is; and</li>
<li>how little there is to do here.</li>
</ol>
<p>It is kinda nice to get away from the condo for a while though and be back with my family; it was starting to get old, sitting around all day with nothing to do. Preferrable to summer school, but all the same, calling something an improvement over summer school isn&#8217;t saying much.</p>
<p>The one downside to our vacation is that we&#8217;ll actually be driving from Tucson to Los Angeles. Not as bad a drive as the one to San Diego&#8212;we pass through real civilization, Phoenix and Blythe instead of Yuma and El Centro&#8212;but still not optimal. I guess I see where my parents are coming from, with flying being much more expensive and really not saving too much more time over driving, but that doesn&#8217;t change the fact that being in a car for seven or eight hours is no fun. I will be taking pictures and will post them once I am back in Tempe at my own computer.</p>
<p>In the meantime, my laptop is now (or will be later this afternoon, anyway) dual-booting again, so that I can at least have <a href="http://www.eve-online.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.eve-online.com');">EVE Online</a> and <a href="http://www.worldofwarcraft.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.worldofwarcraft.com');">World of Warcraft</a> with me at home and on other travels. If it weren&#8217;t for the fact that certain games require me to use Microsoft products, I would be more than happy to never have to acknowledge their existence.</p>
<p>Now I just need to finalize my decision between <a href="http://www.opensuse.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.opensuse.org/');">openSUSE</a> and <a href="http://www.ubuntu.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.ubuntu.com');">Ubuntu</a> for a Linux distribution to dual-boot. Ubuntu I have much more experience working with, and I prefer its package manager; but openSUSE looks better, and works better with docking and undocking, but it&#8217;s been harder for me to configure. I am open to opinions and recommendations, so feel free to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/07/25/vacation-days/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Back to WordPress</title>
		<link>http://jbhannah.net/2008/07/18/back-to-wordpress/</link>
		<comments>http://jbhannah.net/2008/07/18/back-to-wordpress/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 23:09:49 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[Server]]></category>

		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=34</guid>
		<description><![CDATA[Yup. Part of it was my dissatisfaction with Drupal as a straight-up blogging platform (versus WordPress&#8217;s specialization as one), and part of it is the vast improvements made by WordPress in the area of photo uploading and management. That part will still take some playing with to get figured out, but at least I&#8217;ll be [...]]]></description>
			<content:encoded><![CDATA[<p>Yup. Part of it was my dissatisfaction with Drupal as a straight-up blogging platform (versus <a href="http://wordpress.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://wordpress.org');">WordPress</a>&#8217;s specialization as one), and part of it is the vast improvements made by WordPress in the area of photo uploading and management. That part will still take some playing with to get figured out, but at least I&#8217;ll be able to upload more than one photo at a time. I still need to find or write WordPress versions for a couple of Drupal modules I had come to find invaluable, but that&#8217;ll get done in time.</p>
<p>I am still migrating posts over from the old Drupal site (which is available <a href="http://d.jbhannah.net" >here</a> for the time being), but it seems to be going smoothly. In the meantime, proceed to the next post and enjoy some photos of my &#8220;new&#8221; dice set (which I&#8217;ve had for a while, but need to move the photos of over here anyway).</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/07/18/back-to-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Firefox</title>
		<link>http://jbhannah.net/2008/07/13/building-firefox/</link>
		<comments>http://jbhannah.net/2008/07/13/building-firefox/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 04:50:49 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[How-To]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[CVS]]></category>

		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[make]]></category>

		<category><![CDATA[Mozilla]]></category>

		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=17</guid>
		<description><![CDATA[I was having weird problems with Firefox lagging every once in a while, so I decided to just build my own for Mac OS X Leopard on my Intel Core 2 Duo Mac Pro. Didn&#8217;t turn out to be too difficult; Neil Lee at BeatnikPad already has Intel and G5 native builds of Firefox 3 [...]]]></description>
			<content:encoded><![CDATA[<p>I was having weird problems with Firefox lagging every once in a while, so I decided to just build my own for Mac OS X Leopard on my Intel Core 2 Duo Mac Pro. Didn&#8217;t turn out to be too difficult; Neil Lee at BeatnikPad already has <a href="http://www.beatnikpad.com/archives/2008/06/18/firefox3" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.beatnikpad.com/archives/2008/06/18/firefox3');">Intel and G5 native builds of Firefox 3</a> available, but I like having the default branding (Firefox instead of Minefield, the fox icon instead of the weird bomb-planet thing) and a little more customized optimization. Here&#8217;s a basic walkthrough of how I did it; you&#8217;ll need the latest version of Xcode installed, a passing familiarity with the Terminal, and the latest version of libIDL (if you have Fink, <code>fink install libidl2</code>; for MacPorts, <code>sudo port install libidl</code>).</p>
<p><span id="more-17"></span>Start out by creating a <code>Mozilla</code> directory, or some other such directory. Open a terminal, <code>cd</code> into that directory, and (assuming you want the 3.0 branch of Firefox) <a href="http://developer.mozilla.org/en/docs/Mozilla_Source_Code_(CVS)" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.mozilla.org/en/docs/Mozilla_Source_Code_(CVS)');">check out the Mozilla client makefile from CVS</a>:</p>
<pre class="syntax-highlight:bash">cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r BRANCH mozilla/client.mk</pre>
<p>If you want the absolute latest version, omit the <code>-r BRANCH</code> segment; otherwise, replace <code>BRANCH</code> with the name of a <a href="http://developer.mozilla.org/en/docs/CVS_Tags" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.mozilla.org/en/docs/CVS_Tags');">Mozilla CVS tag</a> (<code>FIREFOX_3_0_1_RELEASE</code> for the latest 3.0 branch release, for example). Starting with the 3.1 branch <a href="http://www.selenic.com/mercurial/wiki/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.selenic.com/mercurial/wiki/');">Mercurial</a> will become the <a href="http://developer.mozilla.org/en/docs/Mozilla_Source_Code_(Mercurial)" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.mozilla.org/en/docs/Mozilla_Source_Code_(Mercurial)');">main development version control system for Firefox/Thunderbird</a>/&amp;c., but this article assumes you just want to build for yourself the latest public release version; 3.1 is still very unstable.</p>
<p>Anyway, next you need the configuration file that instructs the make process on how to configure your build of Firefox. The easiest place to put this is in your home directory, as a plain text file named <code>.mozconfig</code>. My file is below:</p>
<pre class="syntax-highlight:bash">mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../OBJ-@CONFIG_GUESS@

ac_add_options --enable-application=browser
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --disable-tests
ac_add_options --enable-official-branding

mk_add_options MOZ_MAKE_FLAGS=&amp;quot;-s -j4&amp;quot;
ac_add_options --enable-optimize</pre>
<p>This makes an officially-branded (<code>ac_add_options --enable-official-branding</code>) Firefox (<code>ac_add_options --enable-application=browser</code> and <code>mk_add_options MOZ_CO_PROJECT=browser</code>) release build (<code>ac_add_options --disable-tests</code>), putting all build files in a separate folder in the <code>Mozilla</code> folder (<code>mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../OBJ-@CONFIG-GUESS@</code>), utilizing four simultaneous build processes (<code>mk_add_options MOZ_MAKE_FLAGS="-s -j4"</code>) and the default optimization options (<code>ac_add_options --enable-optimize</code>). There are a <a href="http://developer.mozilla.org/en/docs/Configuring_Build_Options" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.mozilla.org/en/docs/Configuring_Build_Options');">number of other options</a> available; this is what worked for me for creating an official-release-like build. Be careful with any other options, make sure you know what an option does before you put it into your <code>.mozconfig</code> file.</p>
<p>Back in the terminal (you should still be in the <code>Mozilla</code> directory), <code>cd</code> into the <code>mozilla</code> directory created by the CVS checkout you did earlier. This next command will check out the Firefox browser code for the tag you selected (or the latest bleeding-edge 3.0 series code if you didn&#8217;t specify a tag):</p>
<pre class="syntax-highlight:bash">make -f client.mk checkout</pre>
<p>This may take a while, but when your prompt comes back you&#8217;ll have all the files you need to build Firefox:</p>
<pre class="syntax-highlight:bash">make -f client.mk build</pre>
<p>This will take even longer, as long as half an hour to 45 minutes. Once it&#8217;s finished, there will be a new <code>Firefox.app</code> in the <code>Mozilla/OBJ-SOMETHING/dist</code> directory. You can use this as it is; the only caveat being, you can&#8217;t delete the build directory if you do, because that package still depends on files residing in the build directory. What you probably want to do to use this build as your everyday Firefox in your Applications folder is create a disk image:</p>
<pre class="syntax-highlight:bash">make -C ../OBJ*/browser/installer</pre>
<p>This will create a disk image, in the same style that Mozilla makes available their public releases, in the same place as the <code>Firefox.app</code>. Mount it and drag Firefox from it to your Applications folder; then copy the disk image elsewhere if you want and delete the build folder. If you&#8217;re going to be making changes and rebuilding Firefox later though, it&#8217;ll make that process go faster if you leave the build files in place since it won&#8217;t have to rebuild everything.</p>
<p>If later on you want to upgrade your build to a newer version in the 3.0 branch, open a terminal, go to the <code>Mozilla/mozilla</code> directory again, and</p>
<pre class="syntax-highlight:bash">cvs up -r BRANCH client.mk</pre>
<p>replacing <code>BRANCH</code> with the <a href="http://developer.mozilla.org/en/docs/CVS_Tags" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.mozilla.org/en/docs/CVS_Tags');">name of the branch or tag</a> you want to upgrade to; or to upgrade from a specific branch to the latest <code>HEAD</code> revision:</p>
<pre class="syntax-highlight:bash">cvs up -a client.mk</pre>
<p>and use the same <code>make</code> commands to check out the source tree and rebuild as above. Compiled from the <a class="ext" href="http://developer.mozilla.org/en/docs/Build_Documentation" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.mozilla.org/en/docs/Build_Documentation');" target="_blank">Mozilla Developer Center</a> (various linked pages) and <a class="ext" href="http://www.bluishcoder.co.nz/2007/07/building-video-element-enabled-firefox.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.bluishcoder.co.nz/2007/07/building-video-element-enabled-firefox.html');" target="_blank">Bluish Coder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/07/13/building-firefox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Drupal multisite, clean URLs and lighttpd</title>
		<link>http://jbhannah.net/2008/07/10/drupal-multisite-clean-urls-and-lighttpd/</link>
		<comments>http://jbhannah.net/2008/07/10/drupal-multisite-clean-urls-and-lighttpd/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 08:14:02 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[How-To]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Server]]></category>

		<category><![CDATA[bash]]></category>

		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[lighttpd]]></category>

		<category><![CDATA[Lua]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=19</guid>
		<description><![CDATA[Like I mentioned previously, this site is now being served up by lighttpd; it took a while to get clean URLs working right, but what right now is making my server tick is a very carefully laid-out filesystem and set of bash scripts and lighty config files, wrapped around a Drupal multisite installation to make [...]]]></description>
			<content:encoded><![CDATA[<p>Like I mentioned previously, this site is now being served up by <a href="http://www.lighttpd.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.lighttpd.net/');">lighttpd</a>; it took a while to get clean URLs working right, but what right now is making my server tick is a very carefully laid-out filesystem and set of bash scripts and lighty config files, wrapped around a <a href="http://drupal.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://drupal.org/');">Drupal</a> multisite installation to make installing modules and upgrading the entire system as intuitive and painless as possible. Upgrading Drupal (from 6.2 to the brand-new 6.3 for example) takes no more than running a single command. Here&#8217;s an overview of how my own site is set up, generalized to make it applicable to almost any other system.</p>
<p><span id="more-19"></span>As a general disclaimer, my server is running <a href="http://www.ubuntu.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.ubuntu.com/');">Ubuntu</a> Server 8.04 so your filesystem layout may vary slightly, and I&#8217;m assuming you have a general knowledge of Linux terminology and bash commands, and that lighttpd with PHP and FastCGI are already set up.</p>
<p>To start off, here&#8217;s how the web server file system root (<code>/var/www</code> for me) looks:</p>
<pre>/var
  |- www
    |- drupal -&gt; drupal-6.3
    |- drupal-6.3
      | ...
      |- includes
        | ...
        |- image.imagemagick.inc -&gt; /var/www/drupal-sites/all/modules/image/image.imagemagick.inc
        | ...
      | ...
      |- sites -&gt; /var/www/drupal-sites
      | ...
    |- drupal-sites
      |- all
        |- modules
        |- themes
      |- default
      |- example1.com -&gt; /var/www/example1.com/drupal
      |- example2.com -&gt; /var/www/example2.com/drupal
    |- example1.com
      |- drupal
      |- files
      |- htdocs -&gt; /var/www/drupal
      |- sub
        |- htdocs
    |- example2.com
      |- drupal
        |- files
        |- htdocs -&gt; /var/www/drupal</pre>
<p>To explain briefly in words:</p>
<ul>
<li>The symbolic link <code>/var/www/drupal</code> points to the folder of the current version of Drupal, so that the only thing that has to change when upgrading to a new version of Drupal is the one symlink.</li>
<li>The <code>/var/www/drupal/sites</code> symlink points to the <code>/var/www/drupal-sites</code> directory, which contains the <code>all</code> (and <code>all/modules</code>, where you should install modules for all sites to access them, and <code>all/themes</code>, the same as with <code>modules</code> except for themes) and <code>default</code> directories (which you&#8217;ll never put anything in or do anything with, but need to keep it and its contents around; copy it over from a freshly-downloaded Drupal).</li>
<li><code>example1.com</code> and <code>example2.com</code> have their own directories in <code>/var/www</code>; each one has three folders:
<ul>
<li><code>drupal</code>, which has a symbolic link (<code>ln -s</code>) pointing to it from <code>/var/www/drupal-sites</code> as indicated above;</li>
<li><code>files</code>, which is used as the upload directory with the private download method (if you use the public method, you can just leave the <code>files</code> directory in the site&#8217;s <code>drupal</code> directory alone and omit this one);</li>
<li><code>htdocs</code>, which is the document root for the site pointed to by the site&#8217;s lighttpd configuration file (explained later), and which points back to the Drupal directory symlink for Drupal&#8217;s multisite handling to work.</li>
</ul>
</li>
<li>If you install <a href="http://drupal.org/project/image" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://drupal.org/project/image');">Image.module</a> and want to use the <a href="http://www.imagemagick.org/script/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.imagemagick.org/script/index.php');">ImageMagick</a> library, make a symlink in the <code>drupal/includes</code> directory pointing to the <code>image.imagemagick.inc</code> file in <code>drupal-sites/all/modules/image</code> (the Image.module directory) so that upgrading Image.module also upgrades the ImageMagick include without having to copy over the file each time.</li>
</ul>
<p>Next up is configuring lighttpd. Only a couple changes need to be made in <code>/etc/lighttpd/lighttpd.conf</code> (the global lighttpd configuration file):</p>
<ol>
<li>Uncomment the lines with &#8220;<code>mod_rewrite</code>&#8220;, &#8220;<code>mod_redirect</code>&#8220;, and &#8220;<code>mod_evhost</code>&#8221; to enable those modules.</li>
<li>Further down, look for a commented line beginning with <code>#evhost.path-pattern</code>. Uncomment it or start a new line below it, and write the following:
<pre class="syntax-highlight:bash">evhost.path-pattern = &quot;/var/www/%0/htdocs/&quot;</pre>
<p>Or if you&#8217;re like me, and want (a) to forcibly remove &#8220;www.&#8221; from the beginning of URLs and (b) handle subdomains for each site:</p>
<pre class="syntax-highlight:bash">$HTTP[&quot;host&quot;] =~ &quot;(^|^www\.)[^.]+\.[^.]+$&quot; {
	evhost.path-pattern = &quot;/var/www/%0/htdocs/&quot;
}
$HTTP[&quot;host&quot;] !~ &quot;(^|^www\.)[^.]+\.[^.]+$&quot; {
	evhost.path-pattern = &quot;/var/www/%0/%3/htdocs/&quot;
}</pre>
<p>and for each subdomain <code>sub.example1.com</code> you want to have, make the directory <code>/var/www/example1.com/sub/htdocs</code>.</li>
</ol>
<p>To handle Drupal&#8217;s clean URLs we&#8217;ll use lighttpd&#8217;s <a href="http://trac.lighttpd.net/trac/wiki/Docs:ModMagnet" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://trac.lighttpd.net/trac/wiki/Docs:ModMagnet');"><code>mod_magnet</code></a>, which lets you use <a href="http://www.lua.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.lua.org/');">Lua</a> scripts to handle requests in lighttpd. Put the following in <code>/etc/lighttpd/drupal.lua</code>:<br />
[lua]&#8211; /etc/lighttpd/drupal.lua<br />
&#8211; Based on <http://www.morphir.com/Lighttpd-Install-and-configuration-for-Drupal-with-clean-url><br />
&#8211; Taken from <http://pub.jbhannah.net/scripts/drupal.lua><br />
&#8211; little helper function<br />
function file_exists(path)<br />
	local attr = lighty.stat(path)<br />
	if (attr) then<br />
		return true<br />
	else<br />
		return false<br />
	end<br />
end<br />
function removePrefix(str, prefix)<br />
	return str:sub(1,#prefix+1) == prefix..&#8221;/&#8221; and str:sub(#prefix+2)<br />
end</p>
<p>&#8211; prefix without the trailing slash<br />
local prefix = &#8221;</p>
<p>&#8211; the magic ; )<br />
if (not file_exists(lighty.env["physical.path"])) then<br />
	&#8211; file still missing. pass it to the fastcgi backend<br />
	request_uri = removePrefix(lighty.env["uri.path"], prefix)<br />
	if request_uri then<br />
		lighty.env["uri.path"]          = prefix .. &#8220;/index.php&#8221;<br />
		local uriquery = lighty.env["uri.query"] or &#8220;&#8221;<br />
		lighty.env["uri.query"] = uriquery .. (uriquery ~= &#8220;&#8221; and &#8220;&amp;&#8221; or &#8220;&#8221;) .. &#8220;q=&#8221; .. request_uri<br />
		lighty.env["physical.rel-path"] = lighty.env["uri.path"]<br />
		lighty.env["request.orig-uri"]  = lighty.env["request.uri"]<br />
		lighty.env["physical.path"]     = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"]<br />
	end<br />
end<br />
&#8211; fallthrough will put it back into the lighty request loop<br />
&#8211; that means we get the 304 handling for free. ; )[/lua]</p>
<p>Ubuntu&#8217;s lighttpd comes with a neat system for handling the configuration for separate modules: additional configuration files can be placed in <code>/etc/lighttpd/conf-available</code> with the naming convention <code>##-NAME.conf</code> (the lower the two-digit number <code>##</code>, the earlier it gets loaded), then enabled (or, symlinked in the <code>/etc/lighttpd/conf-enabled</code> directory) with the command (as <code>root</code> or <code>sudo</code>)</p>
<pre class="syntax-highlight:bash">lighty-enable-mod NAME</pre>
<p>replacing <code>NAME</code> with the <code>NAME</code> part of the filename of the configuration file. After that you have to make lighttpd reload its configuration and see the new symlink in the <code>conf-enabled</code> directory:</p>
<pre class="syntax-highlight:bash">/etc/init.d/lighttpd force-reload</pre>
<p>For example, do the following to install <code>mod_magnet</code> on Ubuntu:</p>
<pre class="syntax-highlight:bash">apt-get install lighttpd-mod-magnet
lighty-enable-mod magnet
/etc/init.d/lighttpd force-reload</pre>
<p>Installing <code>mod_magnet</code> creates the file <code>/etc/lighttpd/conf-available/10-magnet.conf</code>, and the <code>lighty-enable-mod</code> command creates a symlink to that file in the <code>conf-enabled</code> directory; then lighttpd picks up the newly enabled configuration file upon reloading.</p>
<p>Another use for this configuration layout is creating and keeping separate configuration files for each domain. Drupal will install and work up to the point before installing <code>mod_magnet</code> and creating <code>drupal.lua</code>, but clean URLs won&#8217;t work because lighttpd can&#8217;t handle directory-specific configuration files (like <a href="http://httpd.apache.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://httpd.apache.org');">Apache</a>&#8217;s <code>.htaccess</code> files, which Drupal is set up to handle out of the box). Instead, we&#8217;ll create a file in <code>/etc/lighttpd/conf-available</code> for each domain, and in there tell lighttpd to use <code>drupal.lua</code> when handling requests for that domain. For example, the file <code>/etc/lighttpd/conf-available/20-example1-com.conf</code> might look like:</p>
<pre class="syntax-highlight:bash"># The following redirects all non-existing subdomains and the &quot;www.&quot; prefix to
# the top domain. Change &#039;sub&#039; below to a vertical-bar (|)-delimited list of
# subdomains.
$HTTP[&quot;host&quot;] !~ &quot;^((sub)\.)?example1\.com&quot; {
	$HTTP[&quot;host&quot;] =~ &quot;^(.+\.)example1\.com&quot; {
		url.redirect = ( &quot;^/(.*)&quot; =&amp;amp;amp;gt; &quot;http://example1.com/$1&quot; )
	}
}

# If you don&#039;t have any subdomains you want to be web-accessible, comment out
# the above and uncomment the following:
#$HTTP[&quot;host&quot;] =~ &quot;^(.+\.)example1\.com&quot; {
#	url.redirect = ( &quot;^/(.*)&quot; =&amp;amp;amp;gt; &quot;http://example1.com/$1&quot; )
#}

$HTTP[&quot;host&quot;] == &quot;example1.com&quot; {
	index-file.names = ( &quot;index.php&quot; )

	url.rewrite += ( &quot;^/frontpage$&quot; =&amp;amp;amp;gt; &quot;/&quot; )
	#	A couple examples of rewrite rules
	#	url.rewrite += ( &quot;^/story/[0-9]{4}/[0-9]{2}/[0-9]{2}/(.*)$&quot; =&amp;amp;amp;gt; &quot;/blog/$1&quot; )
	#	url.rewrite += ( &quot;^/archive/([0-9]{4})([0-9]{2})$&quot; =&amp;amp;amp;gt; &quot;/archive/$1/$2&quot; )

	#	Change /etc/lighttpd to the path of the drupal.lua file
	magnet.attract-physical-path-to = ( &quot;/etc/lighttpd/drupal.lua&quot; )
}</pre>
<p>The naming convention of the file, <code>20-example1-com.conf</code>, may need a little explaining. Actual module configurations have a priority of 10; you want your site&#8217;s configuration to load after <code>mod_magnet</code> has loaded, so giving it a priority of 20 will have it load after all of the default modules you have enabled (but most importantly <code>mod_magnet</code>). Also, periods (<code>.</code>) are not allowed in the filenames of configuration files, so use a dash instead between the domain name and top level domain. Next, enable the module and reload lighttpd:</p>
<pre class="syntax-highlight:bash">lighty-enabled-mod example1-com
/etc/init.d/lighttpd reload</pre>
<p>And there you have it: a Drupal multisite installation served up by lighttpd, with clean URLs fully functional (remember to enable them from the Drupal administration page). Install modules in <code>/var/www/drupal-sites/all/modules</code>; or put the following shell script in <code>/usr/local/bin</code> and make it executable (<code>chmod a+x</code>):</p>
<pre class="syntax-highlight:bash">#! /bin/sh

# /usr/local/bin/drupal-install-mod
# Downloads and extracts a Drupal module to the Drupal sites/all/modules
# directory.

# Copyright (C)2008 Jesse B. Hannah &lt;jesse@jbhannah.net&gt;
# Available under the GNU General Public License
# &lt;http://www.gnu.org/licenses/gpl.html&gt;. Taken from
# &lt;http://pub.jbhannah.net/scripts/drupal-install-mod&gt;.

# Must run as root or sudo!
if [ &quot;$(id -u)&quot; != &quot;0&quot; ]; then
echo &quot;Must be run as root!&quot;
exit 1
fi

if [ &quot;$1&quot; == &quot;&quot; ]; then
echo &quot;Usage: drupal-install-mod NAME-N.n-VERSION&quot;
exit 1
fi

cd /var/www/drupal-sites/all/modules
wget http://ftp.drupal.org/files/projects/$1.tar.gz
tar xzf *.gz
rm *.gz</pre>
<p>and then, to install (for example) version 6.x-1.0-alpha2 of Image.module (Drupal project name &#8220;image&#8221;; run as <code>root</code> or <code>sudo</code>):</p>
<pre class="syntax-highlight:bash">drupal-install-mod image-6.x-1.0-alpha2</pre>
<p>then go to the Drupal modules administration page and enable the newly-downloaded module.</p>
<p>Now, say you&#8217;ve had this site running nicely for a while, then a new version of Drupal comes out. Luckily, thanks to the filesystem layout that keeps all of your site-specific configuration out of the Drupal codebase directory, you don&#8217;t have to manually back everything up elsewhere; simply download the new version of Drupal, give it the symlinks to the sites directory and ImageMagick include, update the <code>/var/www/drupal</code> symlink to point to the new version, and delete the old version. Or, save the following script as <code>/usr/local/bin/upgrade-drupal</code> and make it executable:</p>
<pre class="syntax-highlight:bash">#! /bin/sh

# /usr/local/bin/upgrade-drupal
# Upgrades from one Drupal version to a newer one.
# Copyright (C)2008 Jesse B. Hannah &lt;jesse@jbhannah.net&gt;
# Available under the GNU General Public License
# &lt;http://www.gnu.org/licenses/gpl.html&gt;. Taken from
# &lt;http://pub.jbhannah.net/scripts/drupal-install-mod&gt;.

# Must run as root or sudo!
if [ &quot;$(id -u)&quot; != &quot;0&quot; ]; then
echo &quot;Must be run as root!&quot;
exit 1
fi

# SAFETY! BACK UP /var/www BEFORE BEGINNING!
cd /var
tar cjf www-`date +%Y%m%d`-`date +%H%M`.tar.bz2 www

# First argument: old version; second argument: new version (both X.x)
OLD=$1
NEW=$2

# Get and unpackage the new version and get rid of the package
cd /var/www
wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-${NEW}.tar.gz
tar xzf drupal-${NEW}.tar.gz
rm drupal-${NEW}.tar.gz

# symlink to sites directory
cd drupal-${NEW}
rm -rf sites
ln -s /var/www/drupal-sites sites

# symlink to ImageMagick
cd includes
ln -s /var/www/drupal-sites/all/modules/image/image.imagemagick.inc

# Update /var/www/drupal symlink and remove old folder
cd /var/www
rm drupal
ln -s drupal-${NEW} drupal
rm -rf drupal-${OLD}</pre>
<p>Modify the above for any differences in your setup (comment out the ImageMagick section, for example), then to upgrade (for example) from 6.2 to 6.3:</p>
<pre class="syntax-highlight:bash">upgrade-drupal 6.2 6.3</pre>
<p>then visit <code>update.php</code> for each domain using Drupal in your web browser to update the database schema. If everything <a href="http://www.urbandictionary.com/define.php?term=bork" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.urbandictionary.com/define.php?term=bork');">borks</a> spectacularly after the upgrade, delete the <code>/var/www</code> directory and decompress the bzipped tar file created by the upgrade script in <code>/var</code> to restore your file tree to its prior state.</p>
<p>And there you have it. That&#8217;s pretty much a full rundown of how my server is set up; leave a comment if these instructions work for you, or if you try it and encounter any issues, or if you get it working on another platform besides Ubuntu and want to share what you did differently.</p>
<p><code>drupal.lua</code> script and basic clean URL setup instructions taken from http://www.morphir.com/Lighttpd-Install-and-configuration-for-Drupal-with-clean-url. All scripts indicated as such are copyright ©2008 <a href="mailto:jesse@jbhannah.net?subject=Re%3A%20Drupal%20multisite%2C%20clean%20URLs%20and%20lighttpd">Jesse B. Hannah</a>, and are available with no warranty or guarantee for fitness for a particular purpose under the terms of the <a href="http://www.gnu.org/licenses/gpl.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/mailto:jesse@jbhannah.net?subject=Re%3A%20Drupal%20multisite%2C%20clean%20URLs%20and%20lighttpd">Jesse B. Hannah</a>, and are available with no warranty or guarantee for fitness for a particular purpose under the terms of the <a href="http://www.gnu.org/licenses/gpl.html');">GNU General Public License</a> version 3 or later; all scripts are available for download at <a href="http://pub.jbhannah.net/scripts" >http://pub.jbhannah.net/scripts</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/07/10/drupal-multisite-clean-urls-and-lighttpd/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More upgrades, more sleep</title>
		<link>http://jbhannah.net/2008/07/07/more-upgrades-more-sleep/</link>
		<comments>http://jbhannah.net/2008/07/07/more-upgrades-more-sleep/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 07:24:27 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[School]]></category>

		<category><![CDATA[Server]]></category>

		<category><![CDATA[Apache]]></category>

		<category><![CDATA[cable]]></category>

		<category><![CDATA[condo]]></category>

		<category><![CDATA[Facebook]]></category>

		<category><![CDATA[food]]></category>

		<category><![CDATA[internet]]></category>

		<category><![CDATA[iPhoto]]></category>

		<category><![CDATA[lighttpd]]></category>

		<category><![CDATA[sleep]]></category>

		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=29</guid>
		<description><![CDATA[Still not on any better of a schedule. Not really worth discussing.
The site is now running on lighttpd, to cut back on the memory consumption compared to Apache. It took a while to get all the rewrite rules working right, but it seems to all be working now; use the contact form (returning soon) to [...]]]></description>
			<content:encoded><![CDATA[<p>Still not on any better of a schedule. Not really worth discussing.</p>
<p>The site is now running on <a href="http://www.lighttpd.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.lighttpd.net/');">lighttpd</a>, to cut back on the memory consumption compared to <a href="http://httpd.apache.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://httpd.apache.org/');">Apache</a>. It took a while to get all the rewrite rules working right, but it seems to all be working now; use the contact form (returning soon) to let me know if something isn&#8217;t right.</p>
<p>And between finishing up my summer class (&#8221;Philosophy of Science&#8221;) and working on this site and the one for <a href="http://meteorites-dev.asu.edu/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://meteorites-dev.asu.edu/');">work</a>, I&#8217;m just about completely settled into a new condo with one of my suitemates from last year and a friend of his who I got to know over the course of the year. It&#8217;s a nice place, about a mile from campus and cheap enough for us to afford digital cable and epic-fast cable internet in addition to food, electricity and rent. No real gripes aside from the dishwasher apparently being broken; I&#8217;m still working on getting everything unpacked and set up, but I like it so far. I don&#8217;t have any photos online here yet (they&#8217;re on Facebook for the time being) but as soon as I have a way to upload photos straight here from iPhoto I&#8217;ll post them.</p>
<p>Really not a whole lot else to write about. Maybe a couple more tech how-tos coming up soon, but not tonight. I think I actually want to be awake for most of the day tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/07/07/more-upgrades-more-sleep/feed/</wfw:commentRss>
		</item>
		<item>
		<title>BIND, Drupal, and sleep patterns (or lack thereof)</title>
		<link>http://jbhannah.net/2008/06/29/bind-drupal-and-sleep-patterns-or-lack-thereof/</link>
		<comments>http://jbhannah.net/2008/06/29/bind-drupal-and-sleep-patterns-or-lack-thereof/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 09:22:42 +0000</pubDate>
		<dc:creator>Jesse</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Server]]></category>

		<category><![CDATA[Apache]]></category>

		<category><![CDATA[BIND]]></category>

		<category><![CDATA[church]]></category>

		<category><![CDATA[DNS]]></category>

		<category><![CDATA[domain]]></category>

		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[Gallery2]]></category>

		<category><![CDATA[sleep]]></category>

		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://jbhannah.net/?p=32</guid>
		<description><![CDATA[My web site is now (mostly, anyway) migrated to my new server package, which as previously mentioned is a NetworkRedux Silver Virtual Private Server, paid for yearly (yeesh). Additionally, all of my domain names are now with GoDaddy, and I&#8217;m hosting my own BIND and nameservers—meaning, no dealing with NetworkRedux or having to go through [...]]]></description>
			<content:encoded><![CDATA[<p>My web site is now (mostly, anyway) migrated to my new server package, which as <a href="http://d.jbhannah.net/blog/upgradage" >previously mentioned</a> is a <a href="http://www.networkredux.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.networkredux.com/');">NetworkRedux</a> <a href="http://www.networkredux.com/vps.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.networkredux.com/vps.html');">Silver Virtual Private Server</a>, paid for yearly (yeesh). Additionally, all of my domain names are now with <a href="http://www.godaddy.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.godaddy.com/');">GoDaddy</a>, and I&#8217;m hosting my own <a href="http://www.isc.org/index.pl?/sw/bind/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.isc.org/index.pl?/sw/bind/index.php');">BIND</a> and nameservers—meaning, no dealing with NetworkRedux or having to go through a slow and buggy <a href="http://www.cpanel.net/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.cpanel.net/index.html');">server control panel which shall go unnamed</a> to create subdomains or make other DNS configurations. I am now in complete control of my web server and all online access to it, and am managing it all by hand (primarily via SSH through the command line).</p>
<p>It did take a little longer than I had anticipated to get things put back together to their current state. I went through a couple of minor configuration crises that I did manage to resolve eventually, and just when I thouht I had everything put together—Drupal up and running and everything—I managed to bork it all again. But my perserverance and late nights have paid off, and tada: the site is back online. Two posts still have yet to be migrated over: one because I&#8217;m considering how to attack formatting the large blocks of code it contains, and another because I&#8217;ll be rewriting it to include lots of images, which is dependent on the subject in the next paragraph. Any old links (except those to the two aforementioned posts) should still work fine thanks to a little <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html');">mod_rewrite</a> magic, and the RSS feed is still in the same place as before, so no need to update any old links; it&#8217;s all taken care of.</p>
<p><span id="more-32"></span>A few major changes: instead of <a href="http://gallery.menalto.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://gallery.menalto.com/');">Gallery2</a>, I&#8217;m using <a href="http://drupal.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://drupal.org/');">Drupal&#8217;s</a> <a href="http://drupal.org/project/image" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://drupal.org/project/image');">Image.module</a> for image gallery management, coupled with <a href="http://drupal.org/project/fckeditor" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://drupal.org/project/fckeditor');">FCKeditor</a> for content rich-text editing and <a href="http://drupal.org/project/img_assist" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://drupal.org/project/img_assist');">Image Assist</a> for putting pictures into content. Why? Because this setup plays together more nicely. The major downside is not having an iPhoto export plugin, like I <a href="http://zwily.com/iphoto/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://zwily.com/iphoto/');">did with Gallery</a>, and unfortunately an effort to bring <a href="http://drupal.org/project/image_pub" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://drupal.org/project/image_pub');">Gallery&#8217;s Remote API to Drupal</a> seems to be defunct. So my options now are to either take up the slack myself in porting a remote access API between two web apps I have minimal hacking experience with, or write my own exporter for my exact setup from scratch. Hopefully it won&#8217;t be too long before I can get all of my photos back online in their original glory, with the added awesomeness of more cool stuff. Also, I&#8217;ve scrapped writing my own theme for now and am sticking with the Drupal default, with some custom color modifications which I&#8217;ll write more about later.</p>
<p>And yeah…about sleep patterns. Notice the time that I&#8217;m posting this, take note of the fact that not one day of the week do I have to leave my grandparents&#8217; house by 12:30 (class at 1:10 Monday through Friday—that&#8217;s a whole other rant—and church at 1 on Sunday) and you&#8217;ll probably get a feel for what my day-to-day schedule has been like. Is productivity at the cost of sanity still true productivity? That&#8217;s a question for me to answer after I&#8217;ve had sleep. In the meantime, vote in the poll to the left, and just browse around and admire the shininess.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbhannah.net/2008/06/29/bind-drupal-and-sleep-patterns-or-lack-thereof/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
