7 Things (Meme Attack!)

The memes have attacked and once again my blog is another casualty! This time the onslaught was led by Bytey, supreme commander of the 7 Things meme army division.

Well, as part of my surrender treaty, I’m doing the meme, spreading it further. It’s like aliens implanting their eggs in you, except instead of aliens bursting out of your chest, memes burst out of your blog.

  1. I was once a temp waiter at the Southport Flower Show. It was my first real job (I went to the job centre for it and everything!) and I earned about a seventh of what I earn a month now for three days work.
  2. I had an absolutely terrible attendance rate at school and at college. In all cases I have felt justified. At school I felt everything was too easy and I got bored easily. I didn’t bother turning up because I felt endlessly practising the same things over and over was a waste of time. I’d rather stay home, pretending to be ill and teaching myself matrix math so I could code mods for Quake 1. There were threats of legal action from the government against my mother so I had to go back and keep up my attendance rate. It was much the same with college, but at least I was allowed not to turn up, within reason, and at worst I would have been kicked from the course rather than suffer legal action.
  3. I thought I was the coolest kid on the block for having an Amiga 1200 with a MASSIVE 20MB hard drive!
  4. I have to have cold drinks in a glass and hot drinks in a mug. I feel really wrong drinking something like squash or cold milk from a mug.
  5. I have two extra ribs.
  6. I’ve actually been roleplaying for a really long time since I was around 12 I think when I was doing freeform, no-dice, speech only roleplay in the playground at a school in Bournemouth when I was living in Pokesdown. I’ve lost contact with the guys I played with then, Richard (last name of Hohne I think) and Dominic (whose last name I can’t remember at all).
  7. I’ve always wanted to live in a house like the one from M. C. Eschers House of Stairs, minus the weird bug things.

And tagging. This is the hard bit, I’m not sure I actually know seven people that have a blog and actually use it.

  1. DruidX - my darling wife
  2. Bytey - right back at you (yes, it’s a cop-out I know, give my antisocial arse some slack)
  3. Lost Process - one of my best friends and my best man
  4. Devo - my brother
  5. Bloodred1889 - my friend Jade
  6. Urbanvoodooman - another long time friend of mine
  7. Dan Wentworth - a cool guy I met at LUGRadio Live that turned out to hail from Dorset as well!

And now the rules:

  • Link your original tagger(s), and list these rules on your blog.
  • Share seven facts about yourself in the post - some random, some weird.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

Arrrrrgh!!!

I’ve not been a great fan of SUSE but for some reason I installed it on my media box - all the other boxes in the house have Ubuntu on them. I wish hadn’t decided to try out something different, it’s been a nightmare.

SUSE, quite frankly, is shit. I’ve had no end of problems. When I first installed it it managed to fuck up it’s own update repository info so I couldn’t update anything. after fixing that it was a massive bunch of jumping through hoops to get media working properly, fucking around with enabling and disabling various repos and then having to reinstall packages multiple times so it would actually use the correct (read: packman) ones. Then that broke sound-juicer which I discovered (after looking through the source of sound-juicer and the /usr/lib/gstreamer-0.10 directory) as due to giosink missing. You’d think sound-juicer’s fucking error message would say that, but no, all it says is the plugin or file access is not installed - check the documentation. What plugin? How am I meant to know what that is? There is a metric fuck-ton of gstreamer plugins that deal with file access as far as I can tell, which one do you want that isn’t there? And what documentation? The sound-juicer docs? The gstreamer docs? And where would I find either of these?

FUCK YOU sound-juicer! You vague, mocking bastard!

So, I googled to find where to get the giosink plugin. It’s in the ‘base’ set of plugins, or should be but apparently not in the packman version. Fuck. So I downloaded the original SUSE version, extracted the giosink .so file out of it using a horrible bunch of rpm2cpio and cpio commands and copied that into my systems gstreamer plugin dir.

Thank you so much SUSE, sound-juicer and packman for wasting my time.

Ohhhhh Yeeeaaaahhh!

This is why I love Linux. When you have a problem, research and perseverance will get you through. You aren’t stuck because everything is some stupid proprietary driver or because the various subsystems of your OS don’t provide any logging or configuration.

Today, Lostprocess and I upgraded my mediabox to OpenSUSE 11.1. Installing the fglrx drivers was a bit of an arse but eventually we got it working. Then, we decided to try to setup the HDMI.

Now, I’ve always had a problem with this. I have an Asus P2A something or other which has a M2R68L motherboard. It’s always had some issue or other with it and has never worked properly.

Getting the video to work was easy enough, but the sound was fucked. Nothing would come through.

Eventually we solved it.

First of all we set some module options, like so:


options snd-hda-intel mode=6stack-dig,6stack-dig

But restarting the module with the new settings didn’t help. Eventually it came to light that the problem was to do with pulseaudio.

Pulseaudio was auto-detecting only some of the cards and refusing to send data to the HDMI output. We disabled the hardware auto-detection and forced it to setup the HDMI output as it’s sole audio sink. That sorted it and we were hearing audio via the HDMI! Woohoo!

Basically we commented out the load-module module-hal-detect and module-detect lines and then added a new line something like: load-module module-alsa-sink device=hw:1,3

That sorted it out. There is probably a better way to set the default audio sink of pulseaudio, but I don’t know what it is so disabling every sink except the one I want works out too. Lostprocess actually found the pulseaudio lines required to hack this up, so kudos to him.

VLC seems to have issues with pulse audio or something. Playback with VLC was really juddery consistently but Totem (and anything using gstreamer as well) seems to playback everything fine. Even 720p stuff plays quite nicely (my TV is a 1080i but 720p plays better on it really) which is something that’s always been crappy before.

Overall I’m rather pleased, both with OpenSUSE 11.1 (which is miles better than 10.3 which I had upgraded from - no more waiting for ever for bloody zypper to update the repo caches!) and with the nice, shiny HDMI output. Ohhhhh yeeeeaaaahh!

Of Epic Win and Epic Fail

Well, this weekend was Epic. Bytey and Andrea came down and we hung out, did some geocaching and nearly made Bytey asphyxiate due to laughing on several occasions. It’s so awesome to be able to hang out like that, something we must do more often. Unfortunately, there was a tiny taint of fail. Dru had to work all weekend and Lost was broken on Sunday. We were also going sit down and so some reverse engineering but it was just too much hassle setting up wireless packet sniffing so couldn’t be bothered in the end. We found a cache in Poole Park but failed finding one at Blake Hill Viewpoint but to be honest that was all part of the fun.

Overall, much awesomeness and randomness ensued. We watched films, played Guitar Hero World Tour (and Bytey was bitten by the drumming bug) and hacked at some android code.

Mmmmmm, geeeksto….

Kick-arse SSH authorised_keys tricks

SSH is awesome. Not only is it a package of a secure remote shell, secure remote copying and secure FTP-ing, there are a whole bunch of extra features hidden away that allow you to do lots of cool things, like key-based authentication.

Now, key-based authentication has some pretty cool extra features as well. By using some of the options it provides, you can make your own authentication scheme and restricted shell on top of a single user. What that means is that several people can log into the same user, but depending on their keys, you can give them different permissions to do different things or no any number of cool things based entirely on the unique identity given to them by the key they are logging in with.

It’s this way that gitosis, a git repository management system works, and probably how gitorius and github work too.

Here is a simple example (DISCLAIMER - no idea if this exact code actually works, writing stuff made up from memory here, but you should get the idea):


# on local machine
ssh-keygen -t rsa
# copy the id_rsa.pub to the remote machine

# on remote machine as user 'test'
cat id_rsa >> ~/.ssh/authorized_keys
# now edit the authorized_keys file to be something like...
command="echo The command you would have run was: $SSH_ORIGINAL_COMMAND" ssh-rsa your_key_here

# now, on the local machine
ssh test@remote a_command_to_run
# should return The command you would have run was: a_command_to_run

And you can provide different commands for different keys. What you can do is write a more complicated script to run as the command and give it arguments to identify the key that is running it for example. That script can then look at the original command request and do all sorts of things, like check a database to see if this particular key is authorised to run that command with those arguments or any number of things.

At the office, we’ve written a simple git repository authentication system where we can all login as the same user, but a script will authenticate us against a configuration file to work out whether we have read and/or write permissions against whatever repo we are trying to access. It’s awesome and there is so much more you can do with it.

Another Year, Another NaNoWriMo, Another Failure

Once again I have failed NaNo, following what seems now to be a tradition over 3 years old. This year Dru and I decided to try and work on a single story together, each of us putting in 50000 words. Dru won because she is awesome. I failed with only 25500 words.

Post-mortem - What went wrong

Well, I think the main problem was, ironically, one that Dru was worried would effect her and I was quick to dismiss - that of us writing parts that involved other’s characters.

The plan from the beginning was that we would each take a handful of characters and we would run through their individual plot lines until they met up, where one of us would take over (depending on whose character met whoms, etc, etc. I ended up with two characters, while Dru ended up with 4, pluss all of her secondary characters. My characters on the other hand were mostly solitarry or aloof and didn’t really have much in the way of a supporting cast which I think only contributed to my downfall.

Without enough characters, I began to run out of stuff to write. While Dru could happily plough on through, I needed to keep these two characters going with little support from the rest of the story and not only that, I needed to keep the events of two characters aligned with the events of four other ones, something that made the task of writing for them even more difficult.

Another issue is that I find Dru’s writing style quite hard to read, especially when it’s during the heat of NaNoWrimo and horribly unformatted and unedited. Trying decode the wordstorm so I can work out what’s going on and align events in my own plotlines was taxing and demoralising.

Mostly though, I have only myself to blame. I refuse to ‘cheat’. I refuse to use dirty tricks to bump up my word count. I want to write a novel in a month, not just 50000 words of babbling garbage and mindless repetition. It didn’t have to be a good novel, but it still had to be a novel, otherwise I’d have a character start stuttering at the beginning and never stop until they’d repeated the same word 20000 times or something.

I also didn’t want to give up doing the things I usually do, like watching various TV shows, playing the odd game on the PS3 or doing roleplay. All of those ate time I could have used writing and maybe if I’d had to inclination to forsake these for a month in favour of writing, I’d have done better.

The Good Bits

It wasn’t a complete failure I suppose. This year I’ve got further than ever before. My last record was 14000 so reaching the halfway mark this year was a definate improvement. At this rate maybe I’ll win NaNoWriMo come 2012…

We also have an unfinished (I was meant to write the ending but never did) novel of 75000 words so far and hopefully during editing we can turn our awful spewing of crap into something beautiful, or if not that, at least something we can read without wincing with embarrassment.

I don’t know if I’ll do NaNoWriMo next year, but then again I never do until the few weeks before. Guess I’ll see next year.

Git tracking

We’ve been switching to git recently and something mildly annoys me about it not to mention certain colleagues of mine have a dread fear of editing configuration files. In most git tutorials I’ve seen, once you have created your git project and then want to set up tracking of your master branch against a remote server you are required to edit config files. Git has so many nice little tools for doing everything else, why not something for this? So, for swift justice, we decided to remedy the situation with some bash-fu.


function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}

function git-track {
  CURRENT_BRANCH=$(parse_git_branch)
  git-config branch.$CURRENT_BRANCH.remote $1
  git-config branch.$CURRENT_BRANCH.merge refs/heads/$CURRENT_BRANCH
}

With the above snippet in your bash conf (yes, I recognise the irony of editing a config file to give you a command to avoid editing a config file) you can just type:


git-track [remote name]

to track the branch you are currently in against the same branch in that remote. Simple.

Simple Office 2007 Excel file to CSV hack

I needed to convert a very simple Office 2007 Excel file into a CSV. I don’t have Office 2007 so I hacked up some Ruby goodness to convert it.


require 'rubygems'
require 'hpricot'
doc = open('office2007.xls') { |f| Hpricot(f) }
csv = ''
doc.search('//row').each do |row|
(row/'cell/data').each do |data|
csv < < "\"#{data.to_plain_text}\"," if data
end
csv.chomp!(',')
csv << "\n"
end
File.open("output_file_name", 'w') {|f| f.write(csv) }

Hope someone finds this useful.

Musings on Opinions

Disclaimer: This isn’t directed at anyone in particular, I was just inspired to share my personal attitude towards such things by a recent event.

People amuse me sometimes. I find it immensely funny, the pathetic bitchy comments people make, especially when made behind peoples backs to other people. I don’t really understand the motivation, why would you make known such an opinion to others, what does that actually achieve other than attempting to make others feel bad? Which, I suppose is the only motivation, nothing else really makes sense.

However, hearing about such things only makes me laugh, purely because those kind of motivations and the silliness of the actual acts are so pathetic I can’t help but laugh. It’s like watching a baby trying to pick up a ball and when they finally do they can’t quite grab it in their tiny hands and so they end up accidentally pushing it away as their fingers slip off the surface. The baby just tries again in this naive, cute way hoping it can still get the ball and you can’t help but watch and find it so cute and amusing, because while the baby is a little pathetic, it’s sheer tenacity and determination are so endearing. Another, perhaps better analogy I made is the one of the grizzly bear. If a huge grizzly bear comes up and mauls you, that quite bad, but if you shrink that grizzly bear down so it’s the size of a teddy bear and give it mittens, it’s just cute and funny, even if it is still trying to maul you.

Generally, I despise gossip and the kind of idle speculation and judgements people tend to make about others on a whim. Personally I keep my opinions to myself and try not to judge anyone particularly unless they have slighted me specifically and on purpose. Making judgements about people and gossiping about them achieves basically nothing. No-one actually learns anything and nothing actually changes for the better. Surely if you think something about a person is wrong, it might be best to actually inform them and provides good reasons and arguments to back up your claim? Surely if you feel the need to judge in a negative light, then you have a problem with the thing you are judging and the only way to stop yourself feeling that way is to get the thing to change. You can’t do that by gossiping and making snide comments, but you can try by approaching the person in a reasonable manner and outlining your issues.

That’s why I tend not to like talking about people with other people. What do I care if you hate so-and-so? You have an issue with them, you’re perfectly capable of attempting to sort it out and resolve matters. Telling me achieves nothing other than perhaps to make yourself feel more comfortable with your hate. That’s not something I want to be a part of or something I condone which is why when conversations turn to sniping and bitching about someone, I tend to go on autopilot and just nod and/or make non-committal grunts.

Admittedly, I’m a hypocrite. It would be impossible not to. Everyone makes judgements, it’s human nature, but that’s no reason to accept it and all be bastards to each others. I’ve stated my opinion on various things and doing so can have real practical uses, especially when you justify the reasoning behind your opinion, because then something can actually be done to change it. What I don’t like is stating opinions for no reason and with no justification, they help no-one.

Well, maybe they do help someone. The silliness of it all sometimes provides me with some amusement.

Hacker Key

v4sw5/7CHRSUY$hw7ln7pr5/6FOPck2/4ma9u7/8LMw2TVWXm5l7ELUiOTextMate or GEdit/e5t5FGLMRSb9AGHIKLOSTen5a25s6MRr1p-5.38/-5.23g6ACGMRZ