Archive for July 6th, 2009

06
Jul
09

Gig review: M83 at the Concorde2, Monday 6th July, 2008

It was rather bloody windy out. The smokers were all huddled in the Smokers’ Cage just outside the venue when we arrived. My girlfriend was worried that we’d turned up a little late. “Bands show up on time where I come from!” she said. I’ve never known bands to start playing on time, but there it is. The support band, Maps, started out, and they were pretty good. It took people ages to make their way to the front. What is that about gigs, sometimes? There must have been a ten metre gap between the stage and the first row of people in the audience. What the fuck? Are you people too cool to stand close to the music or what? Well what a bunch of losers. Me and my girlfriend got the best spot in the house to take lots of cool snaps.

Continue reading ‘Gig review: M83 at the Concorde2, Monday 6th July, 2008′

06
Jul
09

One command installation of Firefox 3.5 in Ubuntu

Psychocats posted a howto about how to install Firefox 3.5 in Ubuntu over here. It’s good, but it’s still not completely hands free. So I decided to make it a bit better. Copy and paste the following command into your terminal for Firefox-3.5 goodness.

Update | 8th July: Watch out, this will download the US version of Firefox only. If you’d rather have a version in your own locale, be sure to follow ol’ Psychocat’s version instead.

Code:
if [[ -e ~/.mozilla ]]; then cp -R ~/.mozilla ~/.mozilla.backup; fi; wget -c 'http://download.mozilla.org/?product=firefox-3.5&os=linux&lang=en-US' && sudo tar -jxvf firefox-3*.tar.bz2 -C /opt && rm firefox-3*.tar.bz2 && sudo mv /opt/firefox/plugins /opt/firefox/plugins.backup && sudo ln -s /usr/lib/xulrunner-addons/plugins /opt/firefox/plugins && sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox && sudo ln -s /opt/firefox/firefox /usr/bin/firefox

All in one!

06
Jul
09

Bash aliases: check memory usage, package management, and more!

Check the memory usage of your favourite application in style. Grep the output of ps!

Code:
function ram() { ps auxf | grep $1 | grep -v grep | awk '{sum=sum+$6}; END {print sum+1023/1024}' ; }

Append the time and date to the start of your files.

Code:
function datestamp()
	{
	for x in $@; do
		if [ -e $x ]; then
			mv $x $(date +'%F')-$x
		else
			echo "$x? File doesn't exist, fool."
		fi
	done
	}

Install, remove, autoremove and purge. Now renamed Loadry, unloadry, laundry and nuke, respectively.

Code:
function loadry () {
        if [ $(whoami) != "root" ] ; then
           sudo apt-get install $@
        else
           apt-get install $@
        fi
      }

function unloadry() {
	if [ $(whoami) != "root" ] ; then
	   sudo apt-get remove $@
	else
	   apt-get remove $@
	fi
      }

function laundry() {
	if [ $(whoami) != "root" ] ; then
	   sudo apt-get autoremove $@
	else
	   apt-get autoremove $@
	fi
      }

function nuke() {
	if [ $(whoami) != "root" ] ; then
	  sudo apt-get autoremove --purge $@
	else
	  apt-get autoremove --purge $@
	fi
      }

For anybody who followed the Futurama tutorial, here’s a little something extra, just for you.

Code:
function woots() { #!/bin/bash
  cows=(/usr/share/cowsay/cows/*.cow)
  num=${#cows[@]}
  ((num=RANDOM%num))
  randcow=`echo ${cows[$num]}`
  if [[ $randcow = "/usr/share/cowsay/cows/leela.cow" ]] || [[ $randcow = "/usr/share/cowsay/cows/fry.cow" ]] || [[ $randcow = "/usr/share/cowsay/cows/bender.cow" ]];
    then futurama;
  else
    phrase=`fortune -a`
    cowsay -f $randcow $phrase;
  fi;
}

Ah shucks, maybe someone will find this nonsense useful some day.




 

July 2009
M T W T F S S
    Aug »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Stuff goes here

Hijack this blog

You want to use something from this blag? What the hell is wrong with you? Do you want to fail at life? If you reuse the crap I post here, people will say, "Wow, I never knew anybody could be so ignorant!" Then they will go and find a weapon to beat you with. That's right. There's your god-damned copyright notice. You really care about that shit? Fine. Take it, copy it, pretend it's your own work. Do whatever the hell you want with it, I don't care.

Blog Stats

  • 8,971 people hate me.

Follow

Get every new post delivered to your Inbox.