Farewell, Habari

- January 11, 2009

Well, it's been fun, Habari. Unfortunately, I'll be archiving this blog and moving to a new one at MichaelAHeap.com for a few reasons.

I started this blog as I intended to get more involved with the tech community in 08, and what better way to do that than to jump into developing plugins for fledgling blogging software? Unfortunately, things didn't turn out quite that way. Neither did attending Geekup's or Barcamps (transport/money limitations), nor anything else. I did use twitter more though, and achieved relative fame (for me) for xstriim on Lifestream Blog, then Mashable.

My main focus for 2009 is to "get things done". I'm not going to stick to any of the GTD regimes that are out there, as honestly, I don't have that much going on. It's more about time management, and doing the best I can for my degree, while enjoying life and maybe squeezing in a few side projects too.

One of the things I did read up on last year, though, was your own personal brand. In the tech sector, more and more employers are googling their candidates to see what comes up before an interview. At the moment, I'm a removals firm according to google. I'd quite like to be me.
Establishing an online presence is tricky business. You've got to be active, but also quite cautious. But now, I'm digressing from the original point of the post. I'll probably write about my aims for 2009 on my new blog, over at MichaelAHeap.com, so goodbye, and hopefully see some of you over there.

Merry Christmas! Oh, and xstriim 0.7

- December 25, 2008

First off, Merry Christmas :) Some people would consider being online (and coding) on Christmas day to be a bit sad. I don't. The entire day has been spent with family, and my entire night will be too (as soon as this is posted). Had to escape for at least a little while, and xstriim seemed like a worthy project.

So, xstriim 0.7 is released. This is a lot more "polished" than 0.6, as in, it actually works. The page building system is a lot nicer, as is the end user experience. There's support for multiple accounts, and more templating options. Hopefully for 0.8, the default skin will be redesigned, and a new templating system implemented. It'll be well after the new year though, as I have Xanis to finish by the 1st Jan.

So again, Merry Christmas, and have a Happy New Year. I'll be back in 09!

VHost Configs

- December 14, 2008

Now that I've finally got ubuntu set up on my desktop again, I needed to get a LAMP setup going and start developing again. (I found the eeepc, my current dev system, to be a bit small - perfect for travelling though) Installing it all was easy enough, just run sudo apt-get install apache2 php5 mysql-server-5.0 phpmyadmin

Once it was downloaded and installed, the only remaining thing to do was to set up some virtual hosts. I spent a while looking at them on the eee, so I knew how to do it, but it was going to take me a while to get all my sites set up. I decided to use that time a bit more efficiently and write a script that set things up for me. It took about half an hour, and was way more fun than making all the configs by hand.

I'm far from an expert with vhosts, but this works well enough for me. It'll be a huge timesaver whenever I need to set up a new vhost. It creates a folder named sub.domain.tld in the folder you defined as your webroot at the top of the script. The username variable should be the username of the user who needs write access to the folder.

If you've got any corrections/suggestions let me know in the comments so I can fix it up a bit better

Usage: sudo ./addhost sub.domain.tld

#!/bin/bash

WEBROOT='/home/sites/'
USERNAME='michael'
#########################################################
##
#########################################################

NEW_HOSTNAME=$1

# Make sure we have permission to edit all the files we need to
if [ $UID != 0 ]; then
echo "Please run this file as root"
exit
fi

# Work out how many lines are in /etc/hosts
# Default 10
LINES_IN_HOSTS=$(wc -l /etc/hosts | sed s:\ /etc/hosts::)

# If we have 10, it's our first run, so add a heading
if [ $LINES_IN_HOSTS = 10 ]; then
echo "# Automatically Added Hosts" >> /etc/hosts
LINES_IN_HOSTS=$(($LINES_IN_HOSTS + 1))
fi

# There are 8 padding lines, then we need to increment the IP by one
NEXT_HOST_IP_SEGMENT=$(($LINES_IN_HOSTS-9))
NEXT_IP="127.0.$NEXT_HOST_IP_SEGMENT.1"

########################################################
### Now we have everything we need, just start adding
########################################################

# Add our new host to the hosts file
echo "$NEXT_IP $NEW_HOSTNAME" >> /etc/hosts

# Write our new sites-available file
AVAILABLE_LOCATION="/etc/apache2/sites-available/$NEW_HOSTNAME"
echo " <VirtualHost $NEXT_IP>" >> $AVAILABLE_LOCATION
echo " ServerName $NEW_HOSTNAME" >> $AVAILABLE_LOCATION
echo " ServerAdmin $USERNAME@$NEW_HOSTNAME" >> $AVAILABLE_LOCATION
echo " DocumentRoot /home/sites/$NEW_HOSTNAME" >> $AVAILABLE_LOCATION
echo " <Directory /home/sites/$NEW_HOSTNAME>" >> $AVAILABLE_LOCATION
echo " Options -Indexes" >> $AVAILABLE_LOCATION
echo " AllowOverride All" >> $AVAILABLE_LOCATION
echo " Order Allow,Deny" >> $AVAILABLE_LOCATION
echo " Allow From All" >> $AVAILABLE_LOCATION
echo " </Directory>" >> $AVAILABLE_LOCATION
echo " </VirtualHost>" >> $AVAILABLE_LOCATION

# Link it to sites-enabled
ln -s /etc/apache2/sites-available/$NEW_HOSTNAME /etc/apache2/sites-enabled/$NEW_HOSTNAME

# Create our dev folder in /home/sites
mkdir $WEBROOT$NEW_HOSTNAME
chown $USERNAME:$USERNAME $WEBROOT$NEW_HOSTNAME

# Restart apache2
/etc/init.d/apache2 restart

The Aftermath

- December 12, 2008

It's been a couple of days since Mark Krynsky featured my lifestream script, which then made it onto mashable. It's been hectic to say the least.

Since I first discovered my linkback, I've gone from being jubilant, to never wanting to see any PHP code ever, then back again. I wasn't sure whether to be honoured then fade back into the shadows, or to push on and improve the script so it was suitable for public use. Thankfully, thanks to some twitter messages I recieved, I decided to carry on. And I'm glad I did.

Just over 48 hours later, and the script now has a name, xstriim (hat tip Rob O'Rourke), it's own (admittedly rushed) website along with a download counter (It's at 29! Quite happy for that in 15 hours) and a more user friendly setup package. Also just 48 hours after, I've barely slept, read a lot of new people's twitter feeds and generally forgotten that there's a world outside.

Unfortunately, making it more user friendly also crippled the script a little. Small things, like twitter @name's not being linked, but still things nontheless. This was a sacrifice I had to make to get the rewritten script released early and maximise on the exposure. Hopefully people will realise that this is only an early release, and that I'm committed to release early, release often

My First Linkback

- December 10, 2008

Today, I realised that Mark Krynsky featured featured my lifestream script, and that it has subsequently been picked up by Mashable.

The first thing I did when I realised was of course, to tweet about it. Then I tried to ring my parents, who don't understand anything past email, ebay and Facebook, to tell them. No-one answered, though - so I told all my housemates, who were just as clueless. This is the first time that code I've written has been seen by anyone other than people that I know - and despite the "oh no, people can see my code" factor - I feel pretty good about it.

This is just the kickstart needed to get developing again. Recently, I've been pottering around, starting a project, doing a day's work and then abandoning it. My lifestream script needs some (ok, a lot of) polish, but I believe that someday it could be as recognised as sweetcron.

On a side note, it helped me discover michelle168 on twitter, who is definitely worth a follow if you like the tweets you see to be positive and informative :)


Pages

Syndicate (Atom)

Who