Jekyll to Nikola, not so hard afterall

After I made my last post I was looking through the plugins available for Nikola and found one called 'import_jekyll'. A quick

nikola -i plugin import_jekyll
nikola import_jekyll ~/

And I was done!

Wait, nope, that didn't work. After doing some poking around, I had to edit the plugin to fix a path definition. There is a bug report that had the needed information.

Ok, now let's run nikola import_jekyll ~/

Yay! Files moved. Then I had to enable markdown... and then I had to go through and fix a bunch of import errors. '.code:: LANG' added before code blocks, which doesn't mean anything to markdown, but I guess means something to rst.

Several of the tags had each word split out with commas between each letter, which made the tag cloud look a little strange.

I will need to update this post with specific links to what I needed to do, and I still need to import the ham radio site. Since that one has lots of pictures, I think it will take more work, we'll see.

UPDATE: added the link for fixing the path issue.

Starting over

As I recently changed employers, I thought it might be a good idea to start blogging again.

And I also thought it would be a good idea to try something new, so I am giving Nikola a spin. Previously I have used wordpress, serendipity, octopress, jekyll and even webmake.

I've made a few changes in regards to the tools that I use lately, and this felt like another good change to make. I am using emacs and Org-Mode for notes and project planning. I thought about using some of the converters to use emacs to create my blog, but I decided to use something that was a little more editor agnostic.

I'm also using ruby and starting to look at using python for dev work instead of my goto of perl, not because perl can't do what I want, but because I want to try something different. Also, python is already being used for some projects at work, so it's something I should spend some time on anyway :)

I will most likely be merging my ham radio site into this one, because I want to simplify things a little bit. Not that getting all the content moved over will be simple, but in the long term I think it will be worth the effort. Many of the things that I am interested in cross over between ham radio, games, life, and general geekery.

Courage, Bravery and Heroism

I see people trying to compare one act of courage, bravery or heroism to another. These are all ways to describe someone acting despite their fear, uncertainty and doubt.

While there are many actions that will automatically be described in that way, they are not the only ones. Running into a burning building to save someone else or standing in harms way to protect others are two examples that are easily identified. But for some people just leaving their home is overcoming fear. Speaking in front of an assembled group of ones peers. Standing up to a bully. Taking a stand for something you believe in, whether that be a religious, moral or ethical issue. Depending on the time and place, these could all be very brave and courageous acts.

Just because something is not a challenge for you, or you do not agree with what someone else is doing does not mean that for them it is not an act of courage, bravery or heroism. Don't dismiss or judge harshly someone else just because you don't think what they are doing is brave or you don't agree with them.

One day it will be you that is overcoming fear, uncertainty and doubt in a way that others do not understand or approve of.

Watching long processes through CGI

After slamming my head against a wall for a few hours Friday trying to implement: Watching long processes through CGI

I gave up and left the office. The thing that was really frustrating was that it appeared to be working, and then suddenly, it didn't. And when I even went back and ran Randall's code without any modification, it still didn't work. I was stumped.

Fast forward 12 hours, after some food, some sleep and more searching on google. Here's a clue: It is possible that the original article was written for apache 1.x, not apache 2.x. Anyway, I found a post on where someone was having a similar problem, and they indicated that explicitly closing STDERR and STDIN, as well as STDOUT let the script work as intended.

So here is my diff against the listing in Randall's original article from 2002.

--- col39.listing.txt   2015-03-21 02:01:08.260866239 -0500
+++ /usr/lib/cgi-bin/session_test.cgi  2015-03-21 03:03:34.656454963 -0500
@@ -34,6 +34,8 @@
    print redirect(self_url());
    } elsif (defined $pid) {    # child does
    close STDOUT;             # so parent can go on
+      close STDERR;
+      close STDIN;
    unless (open F, "-|") {
        open STDERR, ">&=1";
        exec "/usr/sbin/traceroute", $host;

Hopefully this saves some other poor schmuck from leaving a bloody dent in their desktop.

fixing the raid

I noticed a couple weeks ago that I kept getting errors in the logs for one of the disks in the multimedia array. This was upsetting, but since I had paid a little more for these disks to get the 5 year warranty, I wasn't too concerned. Then I did a warranty check on the disk. It was the disk that WD sent me to replace the last disk that failed.

Oh goody.

After futzing with the WD support website, they had changed it since the last time I had to RMA a disk, I finally got an advance RMA setup. The disk arrived last week, but I was unable, until today, to get around to replacing it.

So I powered down the server, pulled the bad disk ( installed 2011-04-20 according to the label I put on it ) and put the new one in it's place. Then I rebooted. The system complained about a degraded array, was I sure I wanted to continue, even though I hit 'y', it dropped to a minimal recovery shell. sigh

Reboot, let's try this again. Same thing.

dirty words

Reboot again, hit 'e' to edit the boot paramemeters in GRUB, add 'bootdegraded=true' and voila, it boots.

Now to it was as simple as:
Copy the partition map from the existing drive...

# sfdisk -d /dev/sde | sfdisk/dev/sda

Add the new disk into the array:

# mdadm --manage /dev/md127 --add /dev/sda1

And check on the progress:

 # cat /proc/mdstat 
 Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
 [raid4] [raid10] 
 md127 : active raid1 sda1[2] sde1[0]
       1953511936 blocks [2/1] [U_]
       [>....................]  recovery =  3.8% (75987264/1953511936) finish=218.8min speed=142988K/sec

unused devices: <none>

Not too shabby!

# df -kh /multimedia/
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/raid--lvm-movies  1.8T  841G  882G  49% /multimedia

Now I just need to get the old drive back into the shipping box and get it back to WD so they don't charge me $220 for the replacement disk.