PlusGas, and other assorted potions

Getting rusty nuts and bolts off things is a recurring problem for me. I once had so much trouble getting the downpipe from the fuel tank off a car that ended up having to remove the firewall and drag the whole tank out from the top with the pipe still attached.

The latest rusty things to make me graze my knuckles on things and curse a lot were the nuts holding the wheel on one of my wheelbarrows. My standard techniques for dealing with this, apart from the cursing, are as follows:

Read the rest of this entry »

Underage

Have a guess what this was on the back of…

NOT FOR SALE TO PERSONS UNDER 18 YEARS

What did you think? A crossbow? A box of hand grenades? An assault rifle? Close, but no cigar…

Read the rest of this entry »

I decided to make some nettle beer. As well as continuing the process of making good use out of the so-called bad plants in the garden, the idea of free booze is always appealing. Even more so when it means you aren’t paying taxes to fund the government’s latest ridiculous schemes or expenses claims.

I used this River Cottage recipe as a guide, but here is what I did:

Read the rest of this entry »

Dandelion Fritters (2)

I wasn’t expecting these to be as nice as they were, but seeing as there are millions of them about the place getting on my nerves I thought it was better to make friends with them than be constantly annoyed. Most of them have gone to make wine (more on that another day) but these ones became a friendly lunch, in the following way:

  • Harvest some dandelion flowers, when they’re fully open in the sun. Remove the stalks, just keeping the heads.
  • Make some batter by mixing up some egg, some milk, some flour and some golden syrup.
  • Heat some oil in a frying pan.
  • Hold the flower heads by the green bit, dip the flower heads in the batter and spin them around so they’re coated.
  • Drop them yellow-side down in the pan and fry them until they’re golden brown.
  • Turn them over and fry the other side, but probably not for as long as I did.
  • Eat them.

There is such a thing as a free lunch after all.

Something that’s becoming obvious to me lately is the unintended suitability of a microblog to act as an information hub. To clarify the term microblog here, many may understand that as Twitter, but that would be a bad example because a) it’s both a single public instance of a microblog, and b) it doesn’t have all the capabilities that make this so interesting.

Therefore a good example of what I’m talking about would be a private instance of Laconica running on a local network, or perhaps in a private setup on the public internet. I say private because some of the examples I’m going to give are most appropriate for a private setup.

Read the rest of this entry »

Here’s an interesting side effect of the way git cleverly and silently handles identical changes during a merge, combined with the way history is stored and searched. I’ll demonstrate by setting up the simplest possible scenario. In an empty directory:

git init
echo -e "line 1\nline two\nline 3" >test.txt
git add test.txt
git commit -m "Initial file"
git checkout -b fred
sed -i -e 's/two/2/' test.txt
echo -e "line 4" >>test.txt
git commit -a -m "Fixed line 2 and added line 4"
git checkout master
sed -i -e 's/two/2/' test.txt
git commit -a -m "Fix line 2"
git merge fred

So just to recap what we’ve done in English – we start out with a test.txt that looks like this:

line 1
line two
line 3

Then Fred creates a new branch to add some new functionality (a fourth line) and at the same time notices the error in line two and changes ‘two’ to ‘2′. Fred’s commit results in this, which git sees as two changes (hunks) one for line 2 and one for line 4:

line 1
line 2
line 3
line 4

Meanwhile, back on the master branch, Eric has noticed the same error, and changes ‘two’ to ‘2′ too. So the commit on the master branch results in this, a single change:

line 1
line 2
line 3

Finally, the changes from Fred’s branch are merged back into master. Note that despite both branches not only having changed the same file, but even the same line of the same file, the merge is completely straightforward and automatic – no user intervention is required.

So here’s the gotcha (or at least, it got me). To see why, you probably have to imagine lots more unrelated commits on both branches, and lots of time passing. Eric sees Fred’s commit and thinks “Weird, didn’t I make that change already? I’ll ask git:”

git log test.txt

To his surprise, searching the log for commits that changed test.txt produces no mention of the commit labelled “Fix line 2″. In fact, it shows all the commits EXCEPT that one. So he finds his commit in a more specific way and has a look at what it changed:

git log --name-only --grep="Fix line 2"

The commit is there, and it says it changes test.txt, so there is an apparent inconsistency between what the two forms of git log are reporting here.

In fact, git log is deliberately simplifying the history here. In the default mode, commits from side branches that don’t contribute anything to the final state of the tree are pruned from the output. The way to get the full output is:

git log --full-history test.txt

With the –full-history option added, the output contains all the commits. Worth remembering.

If you don’t know, you probably don’t care, but in any case: stopwords are words you CAN’T search for in a full-text search of the database. They’re filtered out for performance/space reasons, because they’re ‘noisy’.  You know, words like “the” or “and” – things you wouldn’t search for anyway. Or “novel”? “welcome”!?! Anyway, it’s annoyed me so many times that I wrote the following poem composed entirely of them:

Thanx, whoever they may be
For specifying many useful ones
Amongst the others ignored

C’mon, it just isn’t sensible
Consequently I wonder why
But regardless
Somebody somewhere should be sorry

Lacon-iCal is a plugin for the Laconica microblogging platform that provides an iCalendar (RFC 2445) feed for each user’s notices. This initial release makes use of the new plugin system, and therefore requires Laconica version 0.7.2 or higher.

The project repository is hosted at Gitorious and currently consists of a single file. Installation is simple – first, place that file in Laconica’s plugins directory, and then add the following to the end of config.php:

require_once('plugins/ICalPlugin.php');
$ical = new ICalPlugin(20);

The 20 is the maximum number of notices that will be present in a feed – set this to a value that suits your installation.

Once the above is done, the plugin is installed, and you can access a user’s iCalendar feed by appending /ical to their profile url, so http://example.com/bob/ical would be bob’s iCalendar feed, assuming that example.com was running Laconica, and bob was a user there, neither of which is true.

I’ve been called cynical more than once. In fact, I’d go so far as to call myself cynical, and being cynical is a healthy thing if you ask me. Another thing that’s healthy, all of a sudden, and once again, according to the media, is eggs. They used to be good for you, you should have one every day. Then they were bad, you should only have your allotted quota of standard egg units per week. Now you can, and indeed should, have as many as you like again.

Of course, all reasonable people are used to this backwards and forwards nonsense with every kind of food and drink under the sun and routinely laugh it off with a good dose of “all things in moderation” common sense. Only the media seem to suck it up like a sponge, with this latest egg story apparently being headline news everywhere.

I was blissfully unaware until it was given a prime slot on the BBC evening news, the highlight being the way they managed to wheel out the amusingly named Lucy Egerton from the British Egg Information Service without cracking so much as a childish grin.

The cynical side of me though, as always, responded with a weary “who paid for this ‘research’ then?” No surprises in the answer, or the fact that you have to dig a bit deeper than the news stories (a.k.a. press releases) to find out. It was of course the egg industry, which also seems to double up as the acronym industry, what with the BEIS (British Egg Information Service), the BEIC (British Egg Industry Council), BEPA (British Egg Products Association), the BEA (British Egg Association) and many more.

None of this though, should detract from the fact that you should eat eggs. Because they’re nice. Poached, boiled, scrambled, fried or omeletted – you can’t go wrong with an egg. Ok, you could – there is eggnog, for example. But in general, my advice, which I say is just as valuable as some ’scientific’ research paid for by a vested interest, is to eat plenty of eggs. I wouldn’t advise eating eggs produced by an industry though – instead, eat eggs produced by a free* and happy chicken, preferably your own.

*As with free software, the “free” is as in freedom, although of course if they’re your own chickens you don’t pay for the eggs)

Standing Up

Thanks to Steve for putting this idea into my head – working standing up. I’m surprised it’s never crossed my mind before, especially since I actually do it for an hour or so most mornings in the kitchen. That’s great, because you can set up the laptop, kettle and teapot in a convenient arrangement and have a constant supply of tea without stopping work. But doing it ‘on purpose’ in the office, I’d never thought of.

Read the rest of this entry »

« Older entries