Ruby Dice


Playing around with ruby I decided to re-create the Petals Around the Rose game.

 I have completed this however to protect the logic behind the game I'm only going to post the code that create the dice here.

 I'm new to Ruby and OO …

read more | Mon 06 Nov 2006, 12:00 | tags: Ruby | 1 comments

Bash script for keeping Debian & Ubuntu systems up to date - Bash script for keeping Debian & Ubuntu systems up to date.

This script will do a bunch of things - it\'s main purpose is to help keep apt based systems up to date. Check out the top part of ths …

read more | Fri 27 Oct 2006, 00:00 | tags: bash, Linux, system administration | 0 comments

How to "select" and generate locales on Ubuntu LTS 6.06 (Dapper)

For those of you who are used to running "dpkg-reconfigure locales" on Debian to select and generate locales you may be a bit disappointed at the seemingly broken way it is done under Ubuntu.

When I say broken "dpkg-reconfigure locales" does not yield an interface that allows you to select …

read more | Sun 15 Oct 2006, 12:02 | | 0 comments

Connecting a KDDI W41H mobile phone to a Linux box

A 2.4mbps Connection :-)

My mobile phone is a W41H PacketWIN enabled gadget from KDDI/Hitachi. I contacted KDDI today to find out if they supported Linux and or Mac. Of course they did not :-( However, as luck would have it the packet connection worked flawlessly under Linux (Ubuntu …

read more | Wed 21 Jun 2006, 23:14 | tags: Linux | 0 comments

Very basic example of logging

Playing about with ruby

This script checks if it is being run as root. If it is not then the script exits and logs a FATAL error...



# This library is standard in ruby 1.8.x require 'logger' def do_at_exit(message,exit_code,log)   at_exit { log.fatal(message) …

read more | Tue 13 Jun 2006, 15:03 | tags: Ruby | 0 comments