May 17, 2009

Bam! Spotify for linux

Filed under: Uncategorized — Ivan @ 7:43 pm

and graphical too. The source is available at:

http://github.com/ivankelly/Rhythmbox-Spotify-Plugin/tree/master

Installation instructions at:

http://wiki.bleurgh.com/RhythmboxSpotify

Its a plugin for Rhythmbox. Sucks quite hard at the moment, but all the fundamental pieces are there, so it should improve over time.

Only works with a Spotify Premium account

March 31, 2009

Motherfuckers changed the lane colour

Filed under: Uncategorized — Ivan @ 10:47 am

I failed my first driving test yesterday. My big fail was going into a bus lane when I shouldn’t. I never even saw it. Usually the road is a different colour and you have blue signs telling you it’s a bus lane. Well they didn’t have the signs, and they changed the colour sometime around last summer.

Exhibit A:

Start of bus lane

Exhibit B:

One step on

Gah!

March 15, 2009

Also…

Filed under: Uncategorized — Ivan @ 12:02 am

in the delightful fashion of http://www.hasthelhcdestroyedtheearth.com/

*drumroll*

http://www.isjadegoodydeadyet.com/

HTML source is equally amusing. And the fact that the person has taken her lead and sought to profit from it (i.e. google ads).

March 14, 2009

MySQL blob type doesn’t support unicode

Filed under: Uncategorized — Ivan @ 11:57 pm

Well actually the blob type in any db does support character encoding. Quite obvious really, but still took me 2 hours to figure out, during which I deleted 3gigs of a table, which i’m going to have to spend 5 hours rebuilding. Buggery. But for future reference, use the text type.

January 7, 2009

Fun and games with iptables

Filed under: Uncategorized — Ivan @ 11:15 pm

I’ve recently re-topologised my whole network, since buying a Eee box before Christmas. Up until then I had been hosting my mail and websites off site in a Xen virtual host, somewhere in the US. I bought the Eee so I could have a server locally, and its much more powerful than the Xen host, and given that our ISP gave us a static ip, it all seemed like the perfect solution.

So I setup the Eee box in my network here, and told the router to send all traffic aimed at the static ip (93.97.51.193) to the Eee box on the internal network (192.168.3.22). All fine and dandy so far. But what of the machines local on that network who now want to access these sites using their domain names. bleurgh.com resolves to 93.97.51.193. Once the packet hits the router, the router will forward it to 192.168.3.22. But the source address will be the source address of the originating host on the local network, in this case 192.168.3.5.

This is a problem, because when the server sends a packet back to the client, it will send to this address, and the client won’t be expecting it, since it sent its packet to 93.97.51.193. So what to do?

The router had only rudimentary networking tools on it, so I went and ordered a Linksys WRT45GR from netgear, only to find that it’s only a bloody router and not a adsl modem as well. I was planning to put openwrt on it, so I could get access to iptables.

A little poking with my current router (DG834GT) revealed that in fact, it has a telnet interface. I had tried it before, but the page to enable it,
http://192.168.3.1/setup.cgi?todo=debug, was blocked with a password. This was while it still had the firmware on it. I hadn’t tried since I updated to a netgear firmware, but lo and behold, it works and I got a nice little telnet interface into router. And iptables ! Huzzah!

So thinking all my Christmases has come at once, I started to poke at iptables, only to discover that I didn’t have the foggiest idea of what I needed to do. I had two ideas in mind, DNAT and SNAT, but neither quite fit.

DNAT modifies the destination addresses of packets, so I could specify that I wanted all packets for 93.97.51.193 to go to 192.168.3.22. This is what the router is already doing though, except on a different interface. Same problem with the server responding directly to the client occurs.

SNAT makes all packets to a destination seem as if they are coming from a certain source address. So the server, 192.168.3.22, see everything as coming from the router(192.168.3.1). But this doesn’t allow packets to be redirected to 93.97.51.193.

So for the solution I needed DNAT and SNAT working in combination. The rules I used are as follows.

# iptables -t nat -A PREROUTING -s 192.168.3.0/24 -d 93.97.51.193 -j DNAT --to 192.168.3.22
# iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -d 192.168.3.22 -j SNAT --to-source 192.168.3.1

To make the DG834GT retain this past a reboot is another story. It seems to store settings in /tmp/, which I think gets reset on a factory settings reset, so I’ve put it at the end of /tmp/rules.

May 30, 2008

Getting Jabra v250 bluetooth headset working with skype on Linux

Filed under: Uncategorized — Ivan @ 11:20 pm

It’s taken me 4 hours but I’ve finally got my Jabra v250 headset working on Linux. The trick for me was that, despite the offical howto saying to the contrary, I needed to use headsetd.

Also, in dmesg I got a lot of messages like,

hci_scodata_packet: hci0 SCO packet for unknown connection handle 1

This was stopping sco from working also. I think it was trying to use ESCO with the device, but the device only supports SCO. A kernel patching sorted it (patch). Did mean I had to compile the entire kernel again though :[. Really annoys me that you can’t just pull a kernel source tree and build one module. The suck.

May 26, 2008

Filed under: Uncategorized — Ivan @ 11:55 pm

Much to my surprise, I’ve discovered that people this side of the Irish Sea have never heard of the song, “Where’s me Jumper”. So here it is, an education, enjoy :D

May 12, 2008

I’ve decided I don’t like socks

Filed under: Uncategorized — Ivan @ 11:54 pm

It’s been playing on my mind for quite some time now. I go into work, and then my feet start to get uncomfortable. Almost like the socks are sticking to the arches of my feet. Not a sensation becoming of a fellow of by being. So there, I don’t like socks anymore.

December 17, 2007

2007, may you rot an burn in hell

Filed under: Uncategorized — Ivan @ 2:53 am

Another friend, another round traffic accident. This time my best friend. He’s on life support at the moment, but he got a hard knock on the head, and it doesn’t look like he’ll recover. This year has just been a cunt, I hope it fucks off never to be spoken off again.

November 13, 2007

Gah! My body clock seems to be fucked

Filed under: Uncategorized — Ivan @ 5:25 am

All with good reason though. Have been back from Mexico a day and a half and it was a most excellent experience.
I wont bore you with all the details since you can probably get most of it from the photos but there is some things not conveyed in those which I will mention here.

Firstly there’s the matter of bogroll. In Mexico, instead of flushing it with the rest of your business, you generally have to put it in a bin beside the the toilet. The official reason is that their sewage systems aren’t up to it, but I’m convinced that it’s because Mexicans like to examine their own leavings. You do get used of it after a while however, and when I got back to places with proper sewage systems, I still found myself instinctively looking for a bin. Kinda like when you spend a time in a foreign language area, it feels strange going into a shop and asking for stuff in english. You kinda feel bad doing it.

Speaking of which, I think Mexico really helped my spanish. I think my brain has even got to the point where I can construct and understand sentences in my brain without having to translate from english first. I even managed to haggle with an indigenous women, to buy a shirt at a market in San Cristobal, though that was more a matter of shouting numbers and her laughing at me.

Coconuts were quite common in Isla Mujeres (en. Island of Women) and Zihuatenejo and they remained an item of fascination for me for some time until I opened one. They’re really hard to knock out of trees, and it was hard to get a ripe one. Managed to get one in Zihuatenejo though, from the hotel. They aren’t as hard to open as popular media makes out. I had the other husk removed in 10 minutes with nothing but my hotel key and my hands. Nothing like the hours it took Tom Hanks in Cast Away. Getting at the milk was also quite easy. Really should have got a photo of it.

Also in Zihuatanejo, we went surfing in the pacific. Specifically, in Troncones. The waves were about 4 foot, clean and well spaced. It was my first time on a hardtop board and it seemed a lot more controllable than anything I’ve ever been on before. We had a instructor as well, mainly due to not knowing the area, the pacific being unknown territory and some people not having surfed before. He drove what looked to be a gutted VW Beetle (which are very common in Mexico, esp. as Taxi’s in Mexico City). The roof was made of palm leaves. One side of the windscreen there was a bunch of bananas and on the other side coconuts. The passenger seat in the front was a tree stump. It was an experience in and of itself.

Also while we were in Mexico, Tabasco got flooded. We actually went through Villahermosa the day before it happened, and it was already in a bad state at that stage. Each side of the road looked like a big brown lake and it wasn’t far from the level of the road. We were actually on a boat trip on the river that burst its banks the day it did, but we were further upstream. It wasn’t even at the high water mark where we were. The Mexican Embassy in the UK have setup up a HSBC account for donations. Details are on that page. *prods people*

Next Page »