<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Haeg.in</title>
 <link href="http://haeg.in/atom.xml" rel="self"/>
 <link href="http://haeg.in/"/>
 <updated>2010-06-22T10:28:34+01:00</updated>
 <id>http://haeg.in/</id>
 <author>
   <name>Harry Mills</name>
   <email>harry@haeg.in</email>
 </author>

 
 <entry>
   <title>O2 Connection Settings</title>
   <link href="http://haeg.in/mobile/o2-connection-settings/"/>
   <updated>2010-06-15T00:00:00+01:00</updated>
   <id>http://haeg.in/mobile/o2-connection-settings</id>
   <content type="html">&lt;p&gt;I'm trying out a new giffgaff simcard in my mobile and while I'll save the giffgaff gory details for another post I do want to somehow remember my O2 data settings so I'll jot them down here.&lt;/p&gt;

&lt;p&gt;Service: O2 Mobile Web GPRS
Connection: GPRS
Username: web
Password: -Assigned- (yes, very helpful. According to http://filesaveas.com/gprs.html it's password)
APN: payandgo.o2.co.uk&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>What have Google done now?</title>
   <link href="http://haeg.in/Internet/what-have-google-done-now%3F/"/>
   <updated>2010-06-10T00:00:00+01:00</updated>
   <id>http://haeg.in/Internet/what-have-google-done-now?</id>
   <content type="html">&lt;p&gt;Gah. My eyes. They hurt! Seriously Google, get rid of it. Nobody likes it and it's hell for usability. How Marissa Mayer can post about being excited about this &amp;#145;feature&amp;#147; and still keep some claim to being responsible for user experience is beyond me.&lt;/p&gt;

&lt;p&gt;What makes this worse is the fact that the link to turn the background off that is mentioned in the help page doesn't seem to exist on my computer (using Google Chrome on Windows at the moment as I'm at work so it's not even a crazy browser setup or anything). Additionally when I try to change the background using the control panel thing (when I'm logged in), it opens the window which is just blank, loads for a short while then redirects to a page asking for my password again. Once entered it then sends me back to the home page with no changes to the background. Trying to change the background again just sends me thought the loop repeatedly. Google you are getting to be made of more suck.&lt;/p&gt;

&lt;p&gt;Edit: if you want to view the Google homepage without the &amp;#145;art&amp;#146; you can load up &lt;a href=&quot;http://google.com/webhp?pli=1&quot;&gt;http://google.com/webhp?pli=1&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>CLI Samba - Because I ALWAYS forget how</title>
   <link href="http://haeg.in/linux/cli-samba---because-i-always-forget-how/"/>
   <updated>2010-06-10T00:00:00+01:00</updated>
   <id>http://haeg.in/linux/cli-samba---because-i-always-forget-how</id>
   <content type="html">&lt;p&gt;I always forget how to copy files easily over the network using Samba so now I've just worked it out again for the umpteenth time I'll record it her.&lt;/p&gt;

&lt;p&gt;Firstly you need to know the share you want to access so run the following to get a list of the shares on your network.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smbtree
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you know what server and share you want to connect to you can connect using smbclient which works in a similar fashion to an ftp client.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smbclient //SERVER/&quot;Share Name&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notice I quoted the share name because it had a space in it, if you don't have spaces in your share names don't bother quoting it. It will prompt you for a password, if you are browsing as a guest and don't need a password you can just use -N on the command line to stop it asking you for one.&lt;/p&gt;

&lt;p&gt;Once you are connected you should be at the smbclient prompt. From here you can use commands like ls and cd on the remote share and use lls and lcd (local ls and local cd respectively) to work on your local PC.&lt;/p&gt;

&lt;p&gt;If you want to recursively grab a load of files from the remote machine without it asking you on every file you need to do the following.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smb: \&amp;gt; recurse
smb: \&amp;gt; prompt
smb: \&amp;gt; mget &quot;directory you want to grab&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The recurse option toggles on recursing (it's off by default), the prompt option toggles off prompting when doing things to multiple files (it's on by default) and then you need to use mget to get the remote files.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>How much free space?</title>
   <link href="http://haeg.in/linux/how-much-free-space/"/>
   <updated>2010-06-08T00:00:00+01:00</updated>
   <id>http://haeg.in/linux/how-much-free-space</id>
   <content type="html">&lt;p&gt;I have several hard drives and when times are hard and space is scarce I often need to work out how much space I have left to stash random crap in. Now I could look at the output of df -h and do some fairly basic mental arithmetic and come to a reasonable conclusion. Alternatively I could use my super handy shell script I just wrote.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/zsh

NUMB=0

df | while read line; do
    thing=$( echo $line | awk '{ print $4 }' )
    if [ $thing -gt 0 ] 2&amp;gt; /dev/null; then
        NUMB=$(( $NUMB + $thing ))
    fi
done

echo $(( $NUMB / 1024 / 1024 )) MB
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For those who don't know shell scripting that well there are a few potentially odd constructs in there. Firstly the &quot;df | while read line&quot; bit lets me read the output of the df command line by line. Each iteration through the loop sets the value of $line to the next line.&lt;/p&gt;

&lt;p&gt;Secondly the &quot;[ $thing -gt 0 ] 2&gt; /dev/null&quot; part prevents any lines where the part we have grabbed isn't a positive number (this should just be the heading line) from causing problems when we try to add it to the running total of free space. The comparison to ensure it is greater than 0 returns true (a return code of 0) if the number is greater than zero, false (returning 1) if it's a number less than 0, and false again (returning 2 this time) if $thing wasn't even a number. The &quot;2&gt; /dev/null&quot; sends any error message (one is produced if $thing isn't a number) to the black hole device inside your computer.&lt;/p&gt;

&lt;p&gt;Finally the &quot;$(( ))&quot; construct is just one way to do maths in bash and zsh.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Baldur's Gate II installer error 0x80040707</title>
   <link href="http://haeg.in/gaming/baldurs-gate-II-installer-error-0x80040707/"/>
   <updated>2010-06-05T00:00:00+01:00</updated>
   <id>http://haeg.in/gaming/baldurs-gate-II-installer-error-0x80040707</id>
   <content type="html">&lt;p&gt;While installing Baldur's Gate II in Linux using WINE the installer threw error 0x80040707 right at the end of the InstallShield preparing to install step. It turned out it was being caused by one of the folders referenced in the registry not actually existing.&lt;/p&gt;

&lt;p&gt;The fix is detailed on the &lt;a href=&quot;http://consumerdocs.installshield.com/selfservice/viewContent.do?externalId=Q108167&amp;amp;sliceId=1&quot;&gt;InstallShield website here&lt;/a&gt;. To get to regedit in wine just run it as a normal command from the command line. The folder that was causing me problems was&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~/.wine/drive_c/windows/profiles/All users/Start Menu/Programs/StartUp
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 
 <entry>
   <title>Decrepit Drupal and Primeval PHP</title>
   <link href="http://haeg.in/webdev/decrepit-drupal-and-primeval-php/"/>
   <updated>2010-06-04T00:00:00+01:00</updated>
   <id>http://haeg.in/webdev/decrepit-drupal-and-primeval-php</id>
   <content type="html">&lt;p&gt;A few days ago I got a call from a charity I had done some web development work for in the past saying they couldn't log in to their &lt;a href=&quot;http://drupal.org&quot;&gt;Drupal&lt;/a&gt; powered website. After checking the permissions in the database and on the files I tracked the problem down with the help of the Drupal FAQs. Turns out an old version of Drupal on a new version of PHP was causing problems.&lt;/p&gt;

&lt;p&gt;The site was made back when PHP 4 was still all we had but since then my webhost, &lt;a href=&quot;http://www.dreamhost.com/r.cgi?433924&quot;&gt;Dreamhost&lt;/a&gt;, who I highly recommend for their great service, gave me the option of switching to PHP 5 and I took it but didn't check that the version of Drupal used by &lt;a href=&quot;http://shonda.org.uk&quot;&gt;the Shonda website&lt;/a&gt; worked on PHP 5. A quick visual check of the site seem to show it to be fine but as soon as anyone logged in they were logged out once they reached the next page, as if the session cookie wasn't being saved.&lt;/p&gt;

&lt;p&gt;The fix from the Drupal website was to add a line to the config file as a temporary solution with the advice to upgrade the site as soon as possible. As there are more changes for the site planned this summer the upgrade will probably wait until then but if anyone else is running a suitably old version of Drupal with PHP5 you might have problems.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Bonding wired and wireless ethernet devices together to improve reliability</title>
   <link href="http://haeg.in/networking/bonding-wired-and-wireless-ethernet-devices-for-reliability/"/>
   <updated>2010-03-19T00:00:00+00:00</updated>
   <id>http://haeg.in/networking/bonding-wired-and-wireless-ethernet-devices-for-reliability</id>
   <content type="html">&lt;p&gt;A short while ago I was having some problems with certain housemates deciding to unplug my server (which I use for IRC, general tasks, file sharing, remote access and torrenting) from the network. This began to get slightly annoying as I was often using the server remotely at the time so I grabbed an old wireless USB stick I had lying around and set up bonding using my wired ethernet as the main connection and the wireless as the fallback.&lt;/p&gt;

&lt;p&gt;It took a while to get the configuration right as the various guides on the Internet all seem to be aimed at bonding two wired devices together for extra speed (a nice idea but gigabit is plenty fast enough and when I was trying this I didn't have a spare gigabit interface on both my desktop and my server). In the end I got it working with the configuration below. The wireless key has been changed for security reasons.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Bring up lo and bond0 on boot
auto lo bond0

# The loopback interface
iface lo inet loopback

iface bond0 inet dhcp
    bond_mode       active-backup
    bond_primary    eth0
    bond_miimon     100
    bond_downdelay  200
    bond_updelay    200
    slaves          eth0 wlan0
# You only need the lines below if you don't use DHCP
#   netmask         255.255.255.0
#   address         192.168.1.100
#   network         192.168.1.0
#   gateway         192.168.1.1
#   broadcast       192.168.1.255
    wpa-driver      wext
    wpa-ssid        &quot;my-wireless-network-name&quot;
    wpa-iface       wlan0
    wpa-key-mgmt    WPA-PSK
    wpa-psk         &quot;my-wireless-network-password&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This brings up the bond0 interface on startup which starts the eth0 and wlan0 interfaces. The bond_ entries control the bonding. &quot;bond_mode&quot; ensures we use the primary interface where possible and fall back to the slave when it isn't available. &quot;bond_primary&quot; sets eth0 as the primary interface leaving wlan0 as the slave. bond_miimon seems to be set to 100 in every guide I found and is apparently the MII monitor time interval, whatever that is. bond_downdelay sets how long to wait after a host is found to be down before confirming it is down and switching to a fallback host. bond_updelay works similarly when an interface comes back up. This stops a flakey network connection causing so many problems. All these time settings are measured in milliseconds.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Hello, World</title>
   <link href="http://haeg.in/meta/hello-world/"/>
   <updated>2010-02-26T00:00:00+00:00</updated>
   <id>http://haeg.in/meta/hello-world</id>
   <content type="html">&lt;p&gt;So yet another first post for yet another blog.&lt;/p&gt;

&lt;p&gt;After using Posterous since last April I finally got frustrated with issues when logging in to edit posts (it didn't recognise I had logged in), the poor support for inline code snippits (&lt;a href=&quot;http://jalada.co.uk/2009/11/16/using-jekyll-and-git-to-blog.html&quot;&gt;also mentioned by Jalada&lt;/a&gt;) and the odd theme problems such as text boxes stretching off the right hand side of the screen.&lt;/p&gt;

&lt;p&gt;I did some poking around and looking for a replacement. I glanced briefly at tumblr but it was far too Web 2.0 for what I wanted. It also potentially suffered from the same problems posterous had since it was all hosted elsewhere. I decided I wanted a solution hosted on my own webspace.&lt;/p&gt;

&lt;p&gt;I had already ruled out Wordpress as having used it in the past it is too bloated and hard to customise for my needs. I know (X)HTML and CSS fairly well and don't want to deal with a complex templating system or have to wade through large amounts of bad PHP code to change the design of my site.&lt;/p&gt;

&lt;p&gt;A &lt;a href=&quot;http://jens.raaby.co.uk&quot;&gt;colleague of mine&lt;/a&gt;, recommended I take a look at Habari as it strongly favoured open standards and it was written from the ground up to be a modern blog platform, learning from the mistakes others had made in the past. I installed it and poked around a bit and it looked pretty good at first until I found it was a pain in the neck to get it to do code snippits in posts. Habari was out. (Okay - I'll admit I'm picky!)&lt;/p&gt;

&lt;p&gt;I then went back to jekyll, the system Jalada had mentioned in his original post. At first I had discounted it as it seemed tied quite closely to git which I had used in the past and hadn't found it to be as wonderful as the rest of the world clamed it to be. Coming back to it though I figured that the rest of the jekyll philosophy did fit very well with my way of working, I use the terminal a lot (I'm writing this at work where I have to use a windows machine and still have a screen full of terminals open) and as a programmer the idea of keeping my website under version control and generating it as static files appealed greatly. It also gave me an excuse to check out git again to see if I could find out why everyone raved about it so much.&lt;/p&gt;

&lt;p&gt;So with this decision made I spent some time at my parents house playing around with jekyll on my laptop and it seemed to work well. I nabbed a copy of someone elses site to start me off and with a few pointers from Jalada was soon up and running. When I got back home the next day I decided it was the way I wanted to go so I set it up and started playing resulting in this, the first post. I'll hopefully be making a lot of changes as I customise the site for myself over this coming weekend but for now I have a site and have a post.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>
