Notes from the backroom

Feb 08

So you wanna use Windows…

Those who know me are aware of the fondness I have for working with Windows in particular in the context of development. Whatever I think, however, many people choose, or are obliged, to develop on the platform. Depending on your chosen development tools, this can be more or less straight forward.

Consider this scenario: you’re a LAMP-stack developer (in this case, P is for Python). You’re going to be deploying to Linux in production and in test. You have mixed MacOS and Windows developers. The Mac (and Linux) guys have no trouble getting a dev environment built, but it can be a little trickier on Windows which is far less used by LAMP developers.

Windows peeps could change away from Windows but why should they add the switching cost of changing OS to all the rest? Clearly I think there are huge benefits, but I don’t usually like to tell people what to use, much as I myself don’t like being told what to use (yes, thank you, Eclipse is wonderful, but I’m really fast with Vi - I’ve worked with both). 

So, how do we get some of the basics setup? Here are the steps I took.

Read More

Feb 02

Testing Paypal with sandbox

I’ve been testing out django-paypal with a view to using it on a new site. I was always quite against using Paypal - the ‘image’ doesn’t seem right and there are horror stories about non-existent customer service when they decide to stop accepting payments for you at seemingly arbitrary moments.

However, convenience wins sometimes, and the user experience (especially with Web Payments Pro) is pretty good. 

So having decided to try it out, you need to use the sandbox. This isn’t going to be a long tutorial, but a collection of gotcha-resolution points as I come across them.

Read More

Oct 30

we like: uShare + Bravia

New telly is fun. It can play any content from DLNA server and uShare is an apt-get install away from an Ubuntu prompt… and it all just works! I shouldn’t be amazed, but I am. 

Sep 23

Realtek 8191SE WiFi on Thinkpad Edge13… again

Once again WiFi on the Edge flakes out. This time it’s a new broadband router furnished by O2. We’ve been upgraded from the O2WirelessBox II to the O2WirelessBox IV. The excitement is almost… non-existant.

Key to this story is the addition of wireless 802.11N which the Realtek card can handle. Except that it can’t with the Linux drivers (and it seems it flakes out on some Win7 setups as well). 

The bad news is that the usual recourse of rolling a new driver from the latest on the Realtek site didn’t work for us, and using iwconfig to force the card not to use N didn’t work either - seems the card doesn’t allow that (the command being: iwconfig wlan0 modulation 11g). 

So I had to disable N on the router which owners of the O2WirelessBox IV will find cannot be done from the GUI. So for this now very niche demographic, here’s what to do:

> telnet o2wirelessbox.lan
Trying 192.168.1.254...
Connected to o2wirelessbox.lan.
Escape character is '^]'.
Username : SuperUser
Password : 
... splash text...
{SuperUser}=>wireless
{SuperUs{SuperUser}[wireless]=>radio
Admin [up] Oper [up] band [2.4GHz] Interop [802.11b/g/n] channel[11]

So from this we see that 802.11N is enabled. To restrict:

{SuperUs{SuperUser}[wireless]=>radio interop = 802.11b/g
{SuperUs{SuperUser}[wireless]=>radio
Admin [up] Oper [up] band [2.4GHz] Interop [802.11b/g] channel[11]

Now disconnect all devices - actually I’d suggest going via the GUI and disabling WiFi, then re-enabling and have all clients re-connect. You should be good to go now. 

One caveat: this setting does not seem to survive a re-boot. There is probably a way to make it persistent but already I’ve lost a little too much time to this one so for now, this blog will be my memory! 

Aug 18

My SSH config

Just in case you’re interested here’s my config. A great resource for some tricks with SSH (an amazing tool) is SSH Can do that?

# Enable connection sharing
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
# Sometimes speeds up initial handshake
GSSAPIAuthentication no
Host *
    ForwardAgent yes 
    ForwardX11 yes 

Note that connection sharing is not always appropriate. The first connection made to the remote server must be kept open - a logout / Ctl-D will appear to hang if other sessions are sharing this connection. If you force it closed (e.g. with Ctl-C) all other sessions will be terminated.

Jun 14

More strings for the Puppet

Automating system configuration is something every sysadmin should want to achieve. Even if you don’t have physical boxes to configure and manage on a regular basis, increasingly we use virtualisation to spin up machines everywhere from a developer box to the cloud (e.g. EC2) and these machines all need to go from zero to hero, preferably without human intervention.

Read More

May 19

http://ifconfig.me/host -

You want your external hostname when stuck inside an AWS EC2 instance? Handy.

Mar 21

Ubuntu 10.04 on EC2

Not the most thrilling of titles, to be sure, but if you’re looking to dive into the world of Amazon Web Services by starting up some EC2 instances from the Canonical AMIs then my working notes may be of interest. I encountered a couple of problems on the way, but little that did more than expose my ignorance!

Read More

Mar 01

“My enthusiastic little pointy friend is Toothy, and he’s impaling a unicorn to death because you can’t base a business on glitter and rainbows. Real businesses charge. Some might accuse me of creating and promoting lifestyle businesses, but I prefer to call them profitable business” — Amy Hoy, unicorn free:  http://bit.ly/eyWbxn

Feb 05

Toys of the week: pika and redis

Always interested in loose coupling and distributed processing I’ve finally got around to playing with Redis, the key-value store that has typed values and also provides pub/sub messaging. One value type is a list from which one can pop and to which one can push and I’ve been playing with this using the Python redis-py library. 

Redis is intriguing as it is an alternative, for some use cases, to my message bus solution of choice: AMQP, usually implemented by RabbitMQ. The Python AMQP libraries have always been a bit tricky to work with - not playing well with threads and not providing concurrency. pika, it would seem, is what I’ve been waiting for. Time to find out.