Archive for the ‘Uncategorized’ category

ZRMT – to Andy Loughran (www.andyloughran.co.uk)

March 10th, 2012

As I’m opening up ZRMT to multiple authors, I shall be moving my personal things to www.andyloughran.co.uk .

Thank you.

Ubuntu – The Philosophy

March 10th, 2012

When I first came across Ubuntu, I fell in love with the philosophy.

I am who I am, because you are who you are.

Having studied Psychology, the ‘person in social psychology’ is an extremely complex issue. When you ask a person to define ‘who they are’ – they very often describe social relationships. “I’m a rugby player” describes a person, because we can then draw on the social norms associated with rugby players, drinking, fitness, fairness and camaraderie.

In our consumerist society, the western adoption of ubuntu would probably go along the lines of:

“I am who I am because I’m better than him”

In the race to the top, in constantly looking as individuals to better ourselves, the first thing that breaks is community. The social fabric of communities that helped build up the work ethic in the early development of the industrial revolution has been reversed, when now the paradigm is to try and better oneself in comparison to one’s peers.

The problem with this approach is that it breaks community. Instead of looking for shared prosperity, we are looking to break it. The recession of 2009 is evidence that such an approach is not sustainable, nor what people would actually want. I can assert with confidence that the majority of people would be uneasy to say all they want to do is be ‘better than their neighbours’.

The root of the problem then lies in the social system, which is manipulating our individual psychology for prosperity. We are told by adverts to want the next big thing, we need to get bigger houses, more TVs, the latest iPad.

The good news, for me, is that it is the system that is manipulating the individual, rather than an inherent belief in an individual to want to better their peers. The vast majority of people look to share their prosperity with their friends, family and future offspring. There are other factors involved with the status quo, but I will not go into them in this post.

So if we go back to the root, if we look carefully at how we behave. Think about the pound that you spend; the time you use up. It is possible to turn the system on it’s head. I’m lucky enough to have been involved in the ‘Open Source’ movement – this is moving away from software being regarded solely in terms of monetary value, and instead being given a social value. We exchange it for free, so that each of us may have a more prosperous resource from which to work.

Certainly, there are more challenges to be faced when using the same structures to share material goods, but these are not insurmountable. I’m sure anyone that’s worked in retail will be fully aware of the mark-up put on products. If buying through a third party supplier, it’s possible for the end distributor to make far more money on ‘mark-up’ that was earned by the manufacturer. I’d argue that the main reason for this is that the ‘buffer’ between the distributor and manufacturer is large enough for it not to have to play on the conscience of the distributor. If we move to a more local economy, then I’d suggest that these discrepancies in ‘value’ versus ‘price’ would be much narrower.

Coding Guidelines

March 2nd, 2012

I saw this, and I concur:

You code sucks, let's fix it
View more presentations from Rafael Dohms

Back up to Ubuntu server using Time Machine with OS X Lion 10.7

February 5th, 2012

I recently put my mind to tackling the problem that had been plaguing mine and my fiancés MacBook Pros: backups.

We both have files held on our systems that we simply can’t afford to lose. We also work wirelessly. For those reasons Apple’s TimeMachine seemed like a really good option. However, at the £250GBP price tag and already having a home server, a bespoke solution appealed to both the geek and cost-saver in me.

After collating information from several different sources, please find below the steps required to setup and configure an Ubuntu instance to take backups from your Mac via TimeMachine:

Download netatalk 2.2 (The version held in Ubuntu repositories is 2.1 and Lion requires 2.2)

Natty i386: https://launchpad.net/~stefanor/+archive/ppa/+files/netatalk_2.2.0-0ppa2~natty1_i386.deb
Natty amd64: https://launchpad.net/~stefanor/+archive/ppa/+files/netatalk_2.2.0-0ppa2~natty1_amd64.deb
(Others here: https://launchpad.net/~stefanor/+archive/ppa/+packages)

Install netatalk
via dpkg -i <netatalk package name>

Edit /etc/netatalk/afpd.conf
The only line you want: “- -udp -noddp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword”

Edit /etc/netatalk/AppleVolumes.default
Remove the default line for ~/ (if it exists) by commenting it out (a # should do). Add a new line: “~/.TimeMachine “$u Backup” allow:jamesanslow cnidscheme:dbd options:usedots,upriv,tm” – REPLACING “jamesanslow” with YOUR server username.

Create your Timeachine directory
mkdir ~/.TimeMachine should do it fine

Edit /etc/netatalk/netatalk.conf
Add/append/uncomment/leave the same the following important lines to:
ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
ATALK_UNIX_CHARSET=’LOCALE’
ATALK_MAC_CHARSET=’MAC_ROMAN’
export ATALK_UNIX_CHARSET
export ATALK_MAC_CHARSET
CNID_METAD_RUN=yes
AFPD_RUN=yes
AFPD_MAX_CLIENTS=20
ATALKD_RUN=no
PAPD_RUN=no
TIMELORD_RUN=no
A2BOOT_RUN=no

Create a new file in /etc/avahi/services/afpd.service
Copying in the following:
<?xml version=”1.0″ standalone=’no’?><!–*-nxml-*–>
<!DOCTYPE service-group SYSTEM “avahi-service.dtd”>
<service-group>
<name replace-wildcards=”yes”>%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>

Restart netatalk:
sudo /etc/init.d/netatalk restart

Connect to your server from your mac
Go to Finder and your server should appear in the left hand side. If not, CMD+K to manual connect.

Create your sparse backup file
Open up a terminal on your Mac. Move (cd) to the folder where your server’s mounted. This should be /Volumes/<username> Backup. So for me that would be “/Volumes/jamesanslow Backup”. Then run this command to create your backup file (replacing 512g with the size you’d like your TimeMachine to be in Gigabytes):

hdiutil create -size 512g -fs HFS+J -volname “Time Machine” `grep -A1 LocalHostName /Library/Preferences/SystemConfiguration/preferences.plist | tail -n1 | awk ‘BEGIN { FS = “|” } ; { print $2 }’`_`ifconfig en0 | grep ether | awk ‘BEGIN { FS = “:” } ; {print $1$2$3$4$5$6}’ | awk {‘print $2′}`.sparsebundle

Configure OS X to show all types of media for use in TimeMachine
Set OS X to show all types of media, such as ours by running this command in the terminal:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Go for it. Open up TimeMachine, select your network TimeMachine instance and get backing up!

Active Traffic Management

November 7th, 2011

This is a brief addendum to my previous post on the same topic.

I was driving down the M6 the other night, past junction 8 where the M5 splits off – and the Active Traffic Management was turned on.

At one point, we were all going along nicely at 40mph, as indicated by the overhead signs. All lanes were open, and there were no workmen about on the roads.

At the penultimate gantry before the M5 lane forked off the main carriageway, the overhead signs had been set to 20mph. With the majority of traffic moving along nicely, 11pm and no obstructions in the road, the driver of the lorry must have not seen the drop by 20mph. Unfortunately, the car driver in front of him had – and with the threat of the speed camera sign, had slowed his vehicle fairly abruptly.

This sent the HGV swerving into the middle lane, causing me to pull out into the fast lane – luckily fully aware that there was nothing coming up on the outside.

It’s exactly stupid and irresponsible uses of technology like this that make me wonder why Active Traffic Management was put there in the first place.

With the sad events that have occurred on the roads over the past few days, I can only hope that someone has the good sense to review this technology before it too contributes to the rising death tolls on our motorways.