Ricky Moorhouse

Blog

Monster #1

art

Monster #1

This is Monster #1, his outline was drawn in Adobe Ideas on the iPhone, and then the colouring was added using Sumo Paint

Walking on water and developing software from a specification are easy if both are frozen.

Walking on water and developing software from a specification are easy if both are frozen.

Edward V Berard

Substitute fruit

Laura: Would you like some raspberries? Abi: I don't like raspberries. Can you get me ... erm ... a carrot instead? Laura: How about a banana? Abi: Oh Yeah! (excitedly)

Peacock

P1150553

Whilst browsing through my pictures on Flickr, Abi saw this and said:

"I always wished I could have a pet peacock"

Only load jQuery if not already present

Very useful method of ensuring jQuery is loaded before running the code that needs it - from How to build a web widget (using jQuery) - Alex Marandon

[js] /******** Load jQuery if not present *********/ if (typeof jQuery === "undefined" || jQuery.fn.jquery !== '1.4.2') { var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js") script_tag.onload = main; // Run main() once jQuery has loaded script_tag.onreadystatechange = function () { // Same thing but for IE if (this.readyState == 'complete' || this.readyState == 'loaded') main(); } document.getElementsByTagName("head")[0].appendChild(script_tag); } else { main(); } [/js]

Javascript Key Codes

37: left

38: up

39: right

40: down

Doh!

Jessica was reaching for Laura's iPod

"You can't play with the iPod, you're too small"

Jessica: "Doh!"

Useful Ubuntu Stuff

This post is a dumping ground for useful Ubuntu bits and pieces that aren't worth a full post on their own.

Useful Packages

  • Lookit - captures screenshots and upload them to a specified server, then copies the URL to the clipboard - ppa:lookit/ppa

  • Teatime - simple timer, in a Unity launcher

  • Giver - simple file sharing within the same network - install

  • Docky - nice dock - install To get the file browser working nicely with the dock, you need to:

    1. Edit /usr/share/applications/nautilus-browser as root, changing: Exec=nautilus to Exec=nautilus --no-desktop --browser .

    2. Drag "File Manager" from /usr/share/applications to the dock

Useful Commands

dpkg -r <_package>_ remove a package

dpkg --purge <_package> _remove all traces of a package

more at Linux.com: What to do when apt-get fails

Stop the screen from going off when the laptop is shut

Run gconf-editor

Go to  apps-->gnome-power-manager-->buttons ,  set lid_ac and/or lid_battery to "nothing"

NAS Hacking

A while back, we close to filling up the partition on our desktop machine with photos, so I decided to get a second hard drive. In the end, instead of a hard drive, I decided to by the WD My Book World Edition which is a basic Linux server with a 1TB hard drive.

Here's my notes on what I've done with it so far:

  • Enable ssh

  • Install optware

  • Install some useful optware packages (e.g. cron, perl etc)

  • Re-configure the system using prep_whitelight.sh

  • Write script to tweet system status

  • Write script to report stats to MySQL database online

  • Build views to show the stats

Okehampton Extended Services Website