Newspeak

February 7, 2006

Irssi Scripts

Filed under: code — Stephen Paulger @ 7:10 pm

I recently switched to using the Irssi IRC client from XChat. Because the scripts and commands I had become used to in XChat are not available for Irssi I wrote a couple of scripts for Irssi.

Mass Op (/mop) command for Irssi - A script which gives everyone ops on the channel except for people who have “voice” (+v).

XMMS Currently playing script - Says to the channel what you are currently listening to something like

[music | Jefferson Airplane - White Rabbit (Surrealistic Pilow)]

when you enter /xmms

Google-it - A script that says to the current window a url to “Google It, You Moron” based upon specified keywords. For example

/google irssi scripts

produces

http://www.googleityoumoron.com/?go=irssi+scripts

Read this if you don’t know how to use irssi scripts.

November 30, 2005

Last.fm musical taste overlap

Filed under: code, music — Stephen Paulger @ 11:29 am

I have written a short Python script to allow you to find the overlap between the favourite artists of two user’s on Last.fm.

For example, my Last.fm favourites compared to my friend Seb’s favourites currently produces this list.

swp1@flemensfirth:~/src/python/lastfm-intersect$ python pair.py Aimaz cybersebb
In Flames
Pantera
Black Sabbath
Led Zeppelin
Dead Kennedys
Opeth
Beastie Boys
Anathema
Pink Floyd
Queens of the Stone Age
Iced Earth
Rage Against the Machine
Metallica
My Dying Bride

You can download the script here.

I am working on another script to do a similar thing for a group of people, but it needs to be programmed differently, otherwise given a large enough list of users no artists would appear in the list.

November 25, 2005

New Last.fm player (version 1.1.1)

Filed under: music, tech — Stephen Paulger @ 11:35 pm

(edit: this version has been retracted see Last.fm forum post)

Last.fm Player 1.1.1 Screenshot

This is what version 1.1.1 of the Last.fm Player looks like, you can binaries from http://www.last.fm/help/player/ the source code tarball is only version 1.0.4 so if you want the source you should check it out.

svn co svn://svn.audioscrobbler.net/player/trunk

Some people on the Last.fm forums have reported problems using ALSA with the newest player. If you try using it OSS may work for you, I am currently using OSS because I experienced the same problem with ALSA.

I intend to make a new .deb package geared towards Ubuntu users with Qt not staticly linked like in the previous package I made, with files in more appropriate places (not /opt) and all together I’ll try to do a better job :)

*** Update *** I never got round to making a package, those after packages for ubuntu should go here. If you use debian then it is in apt, just install lastfm from apt.

October 28, 2005

Last.fm Ubuntu package

Filed under: music, tech — Stephen Paulger @ 12:11 am

I have created an Ubuntu package of Last.fm Player 1.0.5 (2.7 Mb). It also adds a Gnome menu icon in the ‘Sound & Video’ submenu (Thanks to Mr_T for help with that). If you don’t know Last.fm you should check it out, same goes for Ubuntu.

If you have any suggestions on things that need to go in the package let me know. I’ll try to keep an up to date Ubuntu package on the site from now on.

October 11, 2005

The past does not repeat itself, but it rhymes.

Filed under: uncategorized — Stephen Paulger @ 1:14 am

Mark Twain said, amongst a lot of widely quoted things that “The past does not repeat itself, but it rhymes”. How right he is. Today I found the gallery of the last 50 years of winners of the ‘World Press Photo’ competition. It made me realise that alot of current events are so similar to everything that’s been happening to the world for the last 50 years. So much for progress.

Some particular examples:

1966 - Photo of American Soldiers dragging a Viet Cong corpse behind their vehicle, reminds me of Abu Ghraib and Guantanamo with their indecent treatment of humans.

1969 - Catholics and British police fighting in Londonderry (or just ‘Derry’ if you’re Irish), despite lots of talk it doesn’t really look like much is improving in Northern Ireland. At least there aren’t bombing campaigns now I suppose.

1972 - Children running from napalm dropped accidentally on the wrong area. Even with today’s precision missiles they still manage to hit civilians too often.

1974 - Hunger. Fast forward to 2005 and you have Make Poverty History to help people who are starving.

1977 - South Africa. Police fire tear gas at people protesting against their homes being destroyed. In Zimbabwe Mugabe’s government are now clearing peoples’ homes.

1980 - Hunger. Again.

1983 - Natural Disaster. I need say no more about that I suppose.

1989 - Tiananmen Square, ‘The Unknown Rebel’ a pro-democracy protester, rumoured to have been killed. Recently - Pro-democracy campaigner beaten ‘lifeless’ possibly dead, but no-one knows. (edit: he’s badly beaten but alive)

1991 - Soldier cries at death of a fellow soldier in Iraq.

1992 - Hunger. Again.

1995 - Children affected by fighting between Russia and Chechen rebels. Recently - Hundreds of schoolchildren killed by chechen rebels in a siege.

I think you get the idea.

September 7, 2005

My GreaseMonkey scripts

Filed under: code — Stephen Paulger @ 11:05 pm

I have been getting quite into making GreaseMonkey scripts. If you don’t know what GreaseMonkey is it’s a firefox extension that allows you to use javascript to modify any website you like. I have been reading an excellent online book ‘Dive Into Greasemonkey‘ by Mark Pilgrim in order to learn how to make decent scripts. I have since been uploading the scripts to my userscripts.org profile.

So far I have only put two scripts on, but I think they’re pretty nifty for a beginner :). First is ‘Google Media Search‘ which adds links to google that quickly add the search terms neccesary for finding media directories online.

The other is a modification to an existing script that adds text links to The Pirate Bay and Torrent Reactor from Last.fm to allow single clicking to search for an artist. I changed it to use icons instead of text links and to open the links in a new firefox tab.

September 4, 2005

My Favourite Firefox Extensions

Filed under: tech — Stephen Paulger @ 10:15 pm

Having recently upgraded to Ubuntu’s latest offering “breezy badger” from “hoary hedgehog”. (If you want to do this open your sources.list in vi and :%s/hoary/breezy/ then apt-get update & apt-get dist-upgrade. If you don’t follow that, ignore it) I now finally have firefox 1.0.6 so I thought I’d have a look through my extensions, removing the ones I don’t use and make sure the rest are up to date. I was left with 9 extensions that I have come to rely upon.

  • Mouse Gestures. Almost indisposable for it’s one feature of being able to expand images.
  • StumbleUpon. Gives you an extra toolbar for “stumbling” around the web, which is a suprisingly good way of finding content that’ll interest you.
  • del.icio.us. I don’t rely on this one hugely, but it makes posting bookmarks to del.icio.us much easier.
  • Bloglines toolkit. Notifies me when there are new articles that I have to read on bloglines.
  • Adblock. I barely notice this one it does such a good job.
  • Linkification. Turns URLs in web documents into clickable links, suprisingly useful, again you forget it’s working in the background.
  • SessionSaver. When firefox crashes you don’t lose all those tabs.
  • User Agent Switcher. Luckily not many sites exclude non-IE visitors any more, but if they do, a few quick clicks sorts that all out.
  • BugMeNot. When you don’t want to have to sign up to use every site on-line this tool makes life much easier

I have also just come across a new extension which has a lot of potential to become my favourite extension of all time. That’s GreaseMonkey it allows you to modify the way websites work, which means you can do all sorts of things a lot of great examples can be found here. So far I’ve used only one script which allows you to modify google image search so it links directly to the image.

« Newer PostsOlder Posts »

Powered by WordPress