# apt-get install hello
# hello
Hello, world!
# hello --help
Usage: hello [OPTION]…
Print a friendly, customisable greeting.
-h, –help display this help and exit
-v, –version display version information and exit
-t, –traditional use traditional greeting format
-n, –next-generation use next-generation greeting format
-g, –greeting=TEXT use TEXT as the greeting message
-
Hello world, Debian style
July 14th, 2008Tags: Debian, hello world, Ubuntu -
£5/month for your digitial civil liberties
July 11th, 2008Tags: copyright, creative commons, drm, evoting, foi, freedom, privacy, rightsThe Open Rights Group are a UK based organisation fighting for our civil liberties in the digital age. DRM, e-voting, copyright term extensions, FOI, net neutrality, privacy, RIPA, creative commons etc.etc.etc.etc.etc. They’re like an English EFF.
They have a tiny staff and many other volunteers who are extremely dedicated to the cause and are working very hard for our freedoms. They are funded entirely by donations which pays for the staff, an office and expenses of running campaigns and pestering politicians. They’re currently hoping to push their income up so things are more sustainable.
So, please sign up and give them some money every month. Anything from £5 upwards would be super. If you use computers for pretty much anything, it will make your life better - or at least prevent it getting any worse.
-
MoinMoin wiki on NGINX
June 29th, 2008Tags: config, moinmoin, nginx, wikiFurther to my post about getting the MoinMoin wiki system working with FastCGI and Lighttpd, here is how to do the same with NGINX. MoinMoin is configured in FastCGI mode and listening on port 9005
All the
fastcgi_paramlines up toPATH_INFOare pretty generic and I have them in a separate include file that I pull in for any Fastcgi stanza.if ($uri ~ ^/wiki(.*)?) { set $wiki_url $1; } location /wiki { fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; fastcgi_param PATH_INFO $wiki_url; fastcgi_param SCRIPT_NAME /wiki; if (!-f $request_filename) { fastcgi_pass 127.0.0.1:9005; } } -
Corrupted filesystem recovery dry-run with LVM snapshots
June 5th, 2008Tags: corruption, filesystem, lvm, recovery, resierfs, snapshotsI have a corrupt Reiser filesystem that needs a tree rebuild on it, which can be a scary thing to do (and is only advised when you *really* do need to do it which, unfortunately, I do).
Now, this filesystem largely works, there is just a small part of it that causes problems when accessed. A rebuild could make things a lot worse, or it might just solve my problem (note: my problem appears NOT to be due to hardware failure. rebuilding the tree of a Reiser filesystem on hardware that has badsectors or whatever is VERY likely to make things worse. don’t do it).
So, I’m currently using the filesystem and avoiding the broken bit. I need to know if one: how long a rebuild is going to take, so I can plan the downtime and two: will it complete sucessfully or will the world fall on my head.
LVM snapshots can help here and my filesystem in on a LVM logical volume. The idea is to take a snapshot of the filesystem and run the rebuild on the snapshot. Then you can decide whether you want to take the live filesystem down to rebuild that, or maybe you decide to update your backups best you can and start a new filesystem from scratch.
-
Twitter relay rbot irc plugin
May 25th, 2008Tags: bot, irc, plugin, twitterI wrote a little plugin for rbot that follows a user on Twitter and announces any twits of its friends on irc.
I registered a dedicated twitter account for our irc channel and had it follow everyone in the channel who has a Twitter account. When they twit, we get an announcement within 90 seconds:
<chanbot> via twitter, johnleach is testing his rbot plugin a bit more (23 seconds ago via web)
The plugin is available here and is licensed under the terms of the GNU General Public License v2, just like rbot.
Just drop it in your
.rbot/pluginsdir, rescan, then configuretwitter_relay.usernameandtwitter_relay.channelsand off you go. It will check the rss feed every 5 minutes by default, but that can go as low as around 60 seconds if you settwitter_relay.sleep.Only tested with the latest development snapshot of rbot, but it will probably work with older versions.
-
Graphical Git on GNU/Linux with Giggle
April 27th, 2008Tags: git, gtk, revision controlCheck out (pun!) Giggle, a graphical frontend for the git distributed revision control system. Cute name and much lovelier than gitk. It’s pretty new but already does a lot, and more is planned. See the screeny.
-
Making a staging database with sed
April 26th, 2008Tags: beta, database, development, mysql, sed, stagingQuick one - thought was was cute and useful. I take a copy of live databases once in a while for use in the staging environments, but some apps have references to the live url in the there (Wordpress does this and makes all its redirects using it, making it particularly difficult to test in staging).
This is a simple little way to change all the urls in the db as you clone it:
mysqldump -h live_db_host -u user -pmypass live_db | sed -e '{s/www.example.com/staging.example.com/g}' | mysql -h staging_db_host -u user -pmypass staging_dbThough depending on your MySQL table type you might want to dump to disk first, then pipe it through sed as your live tables might be locked (I’m not actually sure if mysqldump will block waiting for the other processes to catch up)
-
Broken Bus Window
April 20th, 2008 Tags: broken, bus, window -
Speaking at the Manchester Free Software Meeting
April 8th, 2008Tags: brightbox, comic, eler, free software, manchester, talk
I’m speaking next Tuesday (15th April 2008) at the Manchester Free Software about my geeky web comic, Everybody Loves Eric Raymond. Apparently people are still interested in it even though it hasn’t been updated since December! Hooray!It’ll be a bit of a mix of the two talks I’ve done before on ELER, so some stuff about the history of the comic and how I make it, plus some ranting about free software, free markets and leaders.
I was asked by the then organiser (and my friend) Matt Lee who was then extraordinarily renditioned to North America with his new wife, leaving the new organisers to pick up the pieces. Luckily most of the pieces were found and it’s all go, though I do now appear to be talking about my new Rails hosting company too and my name is spelt differently. If there is time, I’ll talk about some of the stuff we’re doing at Brightbox with Free Software.
Talk starts at 7pm at the Manchester DDA. More details on the Manchester Free Software website.
-
6 year old Gnome bug picks up pace
April 5th, 2008Tags: bugs, free software, gnome, nautilusThis bug regarding the Nautilus image thumbnailer performance was reported almost 6 years ago. It had input on it at the rate of around one message every two months, up until the end of 2003 - then nothing until 2006, where duplicate bug reports start coming in pretty regularly until the end of 2006. All pretty quiet until then, kind of suddenly, Michael Chudobiak writes a patch that speeds up Nautilus almost 3400%
I used a test folder that had four 15000x400 tif images and four 15000x400 png images (solid colors). Without the patch, it took Nautilus 4 minutes and 30 seconds to thumbnail the folder. With the patch, it took 8 seconds. I'm not clever enough to touch the actual pixop codebase. But these numbers suggest there is enormous room for improvement! This bug has been open for 6 years - nudge, nudge.
Because free software is forever we can just afford to get there in the end :)
-
Euruko Ruby Conference 2008 in Prague
March 27th, 2008Tags: brightbox, conference, prague, rails, rubyI’m in Prague with Brightbox for the Euruko Ruby Conference 2008 from tomorrow evening until Monday morning. I’ll post photos to the Brightbox Flickr photostream as we go along. If anyone wants to meet up for a drink, email me at john at johnleach dotty co dotty uk.
UPDATE: Photos here.
-
BBC Racism
March 11th, 2008Tags: bbc, israel, medialens, palestine, propaganda, racism, terrorismThe public can see for themselves the ‘neutral’ media language used to describe Israeli actions: ‘incursion’, ‘retaliation’, ‘military operations’. By contrast, Israel endures ‘terrorist attacks’, ‘slaughter’, ‘a bloodbath’. Careful analysis by Greg Philo and Mike Berry, of the Glasgow University Media Group, found a persistent, ugly pattern:
“In our samples of news content, words such as ‘mass murder’, ‘savage cold-blooded killing’ and ‘lynching’ were used by journalists to describe Israeli deaths but not those of Palestinians/Arabs. The word ‘terrorist’ was used to describe Palestinians, but when an Israeli group was reported as trying to bomb a Palestinian school, they were referred to as ‘extremists’ or ‘vigilantes’.” (Philo and Berry, ‘Bad News From Israel’, Pluto Press, London, 2004, p. 259)
http://www.medialens.org/alerts/08/080311_israeli_deaths_matter.php

John Leach is a human being living in Leeds, UK.