Archive for the ‘Uncategorized’ Category

Recipe for a decent bash shell in Android

Wednesday, August 11th, 2010
  1. Root your phone if you haven’t already and install the latest stable CyanogenMod, which includes bash. If this step sounds scary, stop reading now :)
  2. Install ConnectBot:
    Connectbot Market QR code
  3. ConnectBot is a fantastic SSH client, but it also has a local terminal emulator. Open it up and select “local” from the drop down list and give it any nickname.
  4. Open it up to see the local shell works. It will, it’s not bash though and it won’t have tab completion. Hit the menu button and disconnect.
  5. Long-press the connection and select Edit host.
  6. Find the “Post-login automation” option.
  7. enter:
    su
    bash
    export PS1="\w\$ "
    cd /

    This step automatically switches you into root mode (you will be prompted by the superuser manager the first time you do this), starts bash, sets your prompt to the working directory and then changes directory to root.

  8. Hit “OK” and then the back button to return to the connections screen. Select the connection to test if it’s all working.
  9. For quick access, you can add a shortcut to the home screen. Long press on the home screen, select “Shortcuts”, “ConnectBot” then the name of your connection.

Tada! A one-click root terminal in bash with tab-completion (courtesy of ConnectBot’s keyboard shortcuts). Much better than the Terminal app every other blog tells you to install ;)

The BNP Hate Factor League

Wednesday, November 26th, 2008

As I’m sure you all noticed last week, the latest fun leaked data from a polical party came from the BNP who somehow had their entire membership list leaked onto the internet. For people like myself this presented two fun opportunities:

  1. To do a little bit of geographical and statistical analysis on some odd data
  2. To laugh at a bunch of hate-filled racists

There were quite a few nuggets of statistical analysis in the first couple of days: A proximity checker to see which of your neighbours members, the obligatory google maps mashups (since, sensibly taken down), a sort of heat map and the Grauniad did an excellent map broken into electoral wards. They were all pretty good, but they still rather suffered from the problem that you see “hot spots” in areas which are naturally population nodes. There was no accounting for population density.

Anyway, in a spare moment I took a copy of the database, cleaned up the postcode information a bit, ran it through a geocoder to get lat and long data and then ran that through a lookup for population density and then grouped the data by postcode area. What I now have is a count of each person in a postcode area, divided by the population density – this should then give a population normalised rank of how hate-filled post code areas are. Anyway, here’s the Top 40, Top Of The Pops style:

Rank Postal Area Town County Members Population Density Hate Factor
1 LE67 Coalville Leicestershire 56 0.621 90.125
2 S63 Bolton-on-Dearne Rotherham 50 0.557 89.846
3 HX3 Boothtown Halifax 35 0.563 62.182
4 LS27 Morley Leeds 46 0.772 59.618
5 BD22 Oakworth Keighley 32 0.598 53.556
6 CR4 263-265 London Road Mitcham 24 0.48 49.96
7 WF2 Wakefield West Yorkshire 27 0.543 49.727
8 HX2 Illingworth Halifax 27 0.551 48.974
9 NG10 Long Eaton Nottingham 27 0.551 48.97
10 DE55 Alfreton Derbyshire 35 0.735 47.594
11 S75 Silkstone Common Barnsley 33 0.701 47.047
12 LS15 Crossgates Leeds 35 0.772 45.362
13 CW7 Winsford Cheshire 9 0.199 45.124
14 M27 Swinton Manchester 9 0.199 45.124
15 BH1 Bournemouth Dorset 7 0.158 44.439
16 S70 Kendray Barnsley 20 0.463 43.202
17 BD13 Queensbury Bradford 24 0.585 41.025
18 L26 Halewood Knowsley 9 0.238 37.871
19 E4 Chingford Hatch London 12 0.32 37.47
20 B37 Solihull West Midlands 27 0.743 36.339
21 S6 Riverlin Sheffield 19 0.528 35.99
22 DE24 Stenson Fields Derby 26 0.772 33.697
23 N18 Aberdeen Road London 8 0.24 33.307
24 B63 Halesowen West Midlands 13 0.414 31.382
25 S71 Carlton Barnsley 19 0.609 31.192
26 NE34 South Shields Tyne & Wear 24 0.772 31.105
27 CV6 Bell Green Coventry 24 0.772 31.105
28 WF3 Tingley Wakefield 24 0.772 31.105
29 HD7 Leymoor, Golcar Huddersfield 17 0.551 30.835
30 WS9 Aldridge Walsall 17 0.551 30.835
31 CH2 Mickle Trafford Chester 8 0.267 29.923
32 DE21 Oakwood Derby 23 0.772 29.809
33 BD20 Glusburn Keighley 20 0.68 29.405
34 NG17 Kirkby-in-Ashfield Nottinghamshire 31 1.066 29.072
35 DE15 Burton-on-Trent Staffordshire 22 0.772 28.513
36 S5 Sheffield South Yorkshire 18 0.643 27.995
37 S12 Sheffield South Yorkshire 8 0.289 27.649
38 B14 Kings Heath Birmingham 14 0.512 27.347
39 HD3 Longwood Huddersfield 17 0.623 27.303
40 LS9 Leeds West Yorkshire 21 0.772 27.217

Berocca Bribing Bloggers

Thursday, October 2nd, 2008

They’ve clearly gotten a new marketing person over at Berocca in the past year. Having not really touched TV ads until now, they launched a campaign which is clearly targetted at the blogosphere which featured a slighty embarrassing rip-off of OK Go‘s “Here It Goes Again” and now they’re buying blog posts by launching their “Blogger Relief” campaign. You can register your blog and if they like it they’ll send you a box of free stress relieving gizmos.

I don’t need to be paid off to thoroughly recommend Berocca – I’ve been addicted to the stuff for years and it’s saved my life countless times, however the odd cheap bribe never hurt anyone.

If that still doesn’t convince you, the prospect of luminescent orange pee after a glass always brightens up a dull day (and freaks out anyone else in the public toilet).

Beebhack moved to Wikia

Monday, June 2nd, 2008

I had a very nice email from Angela at Wikia this morning, inviting me to move the Beebhack Wiki over to their hosting. I think the only reason Beebhack wasn’t over there in the first place was potential hassle around getting a free wiki approved by their staff. Since they’d been kind enough to email me over there, this was no longer a problem.

So, a good time to take advantage of a better implementation of MediaWiki than we had at BluWiki and hopefully some better uptime. Angela even imported all our existing wiki data for us.

Beebhack.wikia.com

Wii iPlayer, User Agents

Wednesday, April 9th, 2008

The beeb added a little update to the iPlayer again today, clearly as part of their (admirable) attempts at getting iPlayer working on exotic devices iPlayer is now Wii optimised! How cool! I’ve not tested it out, but this is the first “official” iPlayer version which is actually designed to display TV shows on a TV. We are living in the future!

I’ve written a few technical notes over on the Wiki, but basically they’re using the User-Agent string to serve a Flash 7 compatible stream.

Speaking of User-Agents, I’m hearing that the iPhone version of iPlayer has been tightening down on what User-Agent string you can get away with when you pretend to be an iPhone. No more “iPhone, LOL” strings I’m afraid ;)

New BBC Wiki

Wednesday, March 19th, 2008

I’ve created a new wiki all about using BBC content at beebhack.bluwiki.com

In the first 24 hrs it got 1500 page requests and it’s not looking to slow down just yet. I would have hosted it here at Strawp.net but I wanted this to be more community owned than something I would run.

The downside of course is that I really don’t have any detailed information on where any of those hits are coming from…

One in Six Wireless Networks are Sitting Ducks

Monday, November 6th, 2006

A few weeks ago I got a bluetooth GPS module for my iPaq, just to play around with. Since Wififofum collects GPS data if it’s available, I’ve been recording wireless access point data as I’ve been walking about the town, commuting to work or driving.

The data I’ve gotten so far (about 600 access points) isn’t that useful on its own, but what’s really interesting is slicing the data in various ways and seeing what you come up with. To do this I built a new site: wifi.strawp.net into which I can upload the log files from wififofum. For a day or so I had the front page of the site plot location data of access points into Google Maps, searchable by SSID, manufacturer, channel etc, however I was advised by friends that doing so was probably a really bad idea, so this information is now on a login-only basis.

The fun part, which is still publicly available is the stats page. If you’ve got a friend that you’re trying to convince they need to secure their wireless network, link them to that page. You can currently see the most popular manufacturers, the most commonly used SSID and – my favourite – the number of access points that have their default SSID and appear to have no encryption set. This is currently at just over one in six (16.9%), which is quite frankly frightening. You probably won’t be surprised to learn that the best place to look if you want to stumble across one of these access points is a suburban area where if Coventry is anything to go by, you’re likely to find an insecure access point on any street you care to walk down.

If you’re still wondering what the issue is, the BBC’s The Real Hustle did a very neat little feature on why you should use WPA encryption on your network.

Syncing Google Calendar With Everything

Saturday, October 28th, 2006


I have a lot of devices that I’d like to keep the same calendar in sync on: Two phones, an iPaq, my work PC, my home PC and Google Calendar. The smartphone and iPaq played nicely with outlook but there was some “glue” needed to get my Sony Ericsson phone and Google Calendar in on it.

The “glue” is a few pieces of software I found recently. First of all, to sync my Sony Ericsson with GCal I use GCalSync over GPRS, then to sync GCal with Outlook I can use either Companionlink for Google Calendar (a little buggy, doesn’t auto-update, not free) or RemoteCalendars which is Open Source and very flexible. A no brainer which one I picked, really.

More info on using RemoteCalendars with Google Calendars on jakeludington.com

Essential TV Viewing

Friday, October 27th, 2006

If there’s anything good about Summer ending and Autumn and Winter rolling in it’s a new season of TV the world over. In the UK some shows have already had an entire new series and in the US they’re just warming up.

Here’s what I’ve been watching:

- Dexter. A forensics expert who is also a serial killer. Sounds naff, actually really good.
- Everybody Hates Chris season 2. Same as the last season, hasn’t lost its charm yet
- Family Guy season 6. Unlike the Simpsons, this just gets better and better. Currently on episode 3
- Heroes. A new favourite of mine. This series follows the lives of ordinary people as they discover they have super powers. Brilliant characters, compelling plot.
- My Name Is Earl series 2. Proper feel-good, laugh-out-loud stuff
- Robot Chicken series 2. Pop culture gags animated with action figures with plenty of ultraviolence.
- Freak Show A new surrealist cartoon from David Cross about the most ineffective superhero team in the world
- The Mitchell and Webb Look Sighs all round as Mitchell and Webb transition their show seamlessly from Radio 4 to TV. Not a bad miss at all.
- Extras series 2. Trailed off and got a bit formulaic and then pulled it all back for a brilliant last episode
- Lead Balloon. New comedy from Jack Dee who is basically playing himself. Same sort of uncomfortable deadpan humour as Curb Your Enthusiasm and Extras. Great stuff.

Managing podcasts with del.icio.us, Visiting sites l8ter

Friday, October 6th, 2006

I found a neat little site drift past on the del.icio.us popular links feed: l8tr.org. It’s a simple idea – you enter your email address and the URL of a site that is currently being DDoS’d by Slashdot or Digg and it emails you back when it’s popped onto the internet again.

I thought this would be really cool if there was a Firefox feed or Javascript bookmarklet for it so you could just hit a button when you see an error 500. A few emails with the creator, John and he’s added a bookmarklet to the confirm page. Kudos!

File this under del.icio.us hacks: As you might guess I use my own PHP script, Automated Serendipity to aggregate all my podcast feeds. This squirts them onto the end of my current Winamp playlist. I’ve been using it this way for a little over a year, but now I’m using del.icio.us to manage all my feeds. My podcast feeds (and MP3 blogs) are all tagged with “podcast feeds” so all that’s required is a quick bit of PHP to drop it down into the flat file format the my script expects et voila, I now manage my podcast subscriptions by adding them to del.icio.us, giving me one centralised base to refer to.

If you want the PHP to drop a del.icio.us page into flat text, you’ll want this zip. It’s got a little hack in there to extend the number of records to 100 as the RSS feed limit is 40 and the page limit default is around 25 (I think).