# Older blog entries for dgh (starting at number 26)

removing cartridge bearings

Finding advice on removing a cartridge bearing from a bicycle wheel proved surprisingly difficult recently. Even a fairly recent and comprehensive bicycle repair manual that I had to hand didn't say anything about it.

It turns out the way to do it is to remove any end caps and locknuts and washers and nuts and then bang the end of the axle really hard against a piece of wood. You will probably make dents in the piece of wood.

This works because cartridge bearings are pressure fit both to the hub and to the axle. (This is really neat!) Both the hub and the axle are stepped to hold the cartridge in place. A hard enough bang will simultaneously make the step on the upmost side of the axle pop the upmost cartridge from the hub and make the step on the downmost side of the hub pop the downmost cartridge from the axle. You can then pull the axle out and remove the other cartridge by poking through a screwdriver or similar and tapping with a mallet.

Syndicated 2011-03-31 04:37:43 from Dafydd

Breakdown: Markdown for presentations

Recently I've been giving a few talks, and anticipate giving several more in the near future, and have been getting annoyed at how time-consuming writing the slides is. My current preferred (read: least despised) tool for writing slides is LaTeX Beamer, which is a fairly good compromise between simplicity, control and quality. However, the markup is still somewhat verbose, and hence time-consuming to edit.

To make things easier, I wrote a tool, Breakdown, which converts Markdown to Beamer. Of course, Markdown only has limited text formatting capabilities, so Breakdown passes through LaTeX commands. This way, the easy things are easy and hard things are possible.

For example, the markup:

@@

# Breakdown

* Quick and simple
* Use \LaTeX syntax when you need to, e.g.
* for equations: $e^{i\pi} + 1 = 0$
* for quoting'' things
* for images, code listings, tables, quotations\ldots


Gets converted to:

Conversion can be automated using a couple of Makefile rules:

  %.pdf: %.tex
rubber -d $< %.tex: %.mdwn breakdown <$< > \$@



Thankfully, the excellent Pandoc Haskell library does msot of the work; most of the Breakdown code is for splitting the input into slides.

Breakdown has a competitor in wiki2beamer, but I like the fact that Breakdown uses a standard markup language and standard TeX commands with a very small amount of custom syntax, rather than a custom wiki-style markup. Each to their own.

The code is in a git repository.

Syndicated 2011-03-01 19:40:26 from Dafydd

dgh @ 2009-05-16T11:09:00

Futility Closet, ever edifying, notes that the word “ravine” is reversed when rot13 is applied. Are there other words that have the same property? We can easily find out with a bit of code:

> import qualified Data.ByteString.Char8 as B
>
> rot13 = B.map (toEnum . r . fromEnum)
>    where r c | (65 <= c) && (c <= 90)  = (c - 65 + 13) mod 26 + 65
>              | (97 <= c) && (c <= 122) = (c - 97 + 13) mod 26 + 97
>              | otherwise = c
>
> main = B.interact (B.unlines . filter (\x -> rot13 x == B.reverse x) . B.lines)


The answer: not many. Running this on /usr/share/dict/words yields a paltry 12 words; all of which, “ravine” excepted, are four letters or less. We get slightly better results running it on the 390,583-word british-english-huge file from 12dicts (which I keep installed for exactly this sort of tomfoolery). On the other hand, some of the extra words are quite obscure. The full list:

an anan cherup fans fobs fs gant gnat grivet na nana ravine re rebore rive robe serf tang thug uh

(This post can be compiled by saving it as a .lhs file and running ghc --make on it.)

Syndicated 2009-05-16 08:35:52 from Dafydd

3 May 2009 (updated 14 Aug 2009 at 09:18 UTC) »

recent hacking

## crosswords

I enjoy crosswords very much, and for a while I've been loading the free Houston Chronicle crosswords in Xword. Although they indulge in sports references (which I'm useless at) and tend to be a little repetitive, they have nice puns and they have a good variety of difficulties (they follow the US convention of easiest ones on Mondays and hardest ones on Sundays). Incidentally, the repetitiveness seems common to US crosswords — perhaps a side-effect of the US grid style?

However, I like the Guardian's crosswords a lot too. Unlike the Chronicle, they have cryptics, which I like to try my hand at from time to time. The problem is that the Guardian crosswords are only available online via an annoying Java applet or as PDFs. I managed to work around this using the fact that the input to the Java applet is encoded on a screen-scrapable HTML page, and wrote a tool to convert the HTML to the AcrossLite .puz format. To get the reulsting files to work in Xword, I had to write some patches to support British-style grids.

## debri

Like debi, but installs packages to a remote host over SSH. Useful when cross-compilating for Debian-based embedded systems.

Syndicated 2009-05-03 19:55:15 (Updated 2009-08-14 08:44:21) from Dafydd

25 Feb 2009 (updated 25 Feb 2009 at 20:09 UTC) »

Jingle interoperability day

Before FOSDEM this year, a bunch of people got together to test our various Jingle implementations with each other. Attendance was great: I think we had representatives from most implementations, and we almost ran out of chairs.

Paul Witty from Tandberg and Sjoerd from Collabora, testing Jingle calls to a Tandberg video conferencing endpoint.

I'd judge the event a great success: we found a number of bugs and even fixed some of them the same day. In particular for Collabora, we got to try out our new support for raw UDP transports and the latest ICE signalling. There was also good discussion about future directions for file transfer and relaying support in Jingle, as well as XTLS and its relationship to Jingle. Plus, the testing done on the day itself was continued afterwards, notably including working interoperability between our ICE library, libnice, with Paul's implementation.

Syndicated 2009-02-25 08:10:04 (Updated 2009-02-25 19:44:34) from Dafydd

2 Dec 2008 (updated 21 Jan 2009 at 21:07 UTC) »

Multi-User Jingle

Update Since I posted this, we discovered that our first choice of name, Mingle, has some trademark problems. For the time being, we're going to call it Multi-User Jingle.

When I joined Collabora in 2006, I was quickly thrown into the deep end when I was assigned to work on extending Jingle, the then-nascent VoIP protocol for Jabber, to support video. That work came to fruition on the Nokia N800, and the protocol we developed is incorporated into the latest Jingle drafts (which incidentally are now in Last Call).

This year, we wanted to try to take Jingle further by extending it to support more than two participants, and a grant from the NLnet Foundation made it possible for Sjoerd and I to spend time on it. I'm now happy to announce that we have a working implementation of the beast we've dubbed Mingle Multi-User Jingle. There is still much that remains to be done, but we think that the basic design is finished.

Our initial implementation builds heavily on work done by others. Wim's RTP session manager for GStreamer gives us clock syncing and RTCP support. Olivier's Farsight 2 work gives us multiparty-capable codec discovery and autoplugging. Youness's work on libnice gives us robust NAT traversal using ICE.

Future protocol work includes support for multicast transport, media mixers and relays, and of course ironing out all the corner cases that will inevitably turn up. Our ultimate goals are to standardise the protocol through the XEP process and to make it possible to use it with Empathy.

We've submitted a draft XEP to the XMPP editor, and kicked off some discussion on the Jingle mailing list. Our wiki page describes how to get our client working. This currently isn't as easy as we'd like due to the dependency on recent versions of various components, but should become easier with time.

Syndicated 2008-12-02 19:00:32 (Updated 2009-01-21 20:37:57) from Dafydd

24 Oct 2008 (updated 24 Oct 2008 at 18:05 UTC) »

serious change

My friend Francis has launched Serious Change, an initiative to represent UK citizens who want climate change to be taken as seriously as it deserves to be, and who believe it can be an opportunity and not just a threat. As a MySociety dude, Francis knows a thing or two about getting people engaged via useful websites.

Francis rightly points out that climate change is not a partisan issue. Nor is it a ‘green’ issue. It affects us all. It's not just another environmental problem. It changes everything. Individual, voluntary action will not solve it — even the Confederation of British Industry is calling for the government to legislate (and is in the meantime getting proactive). Furthermore, what we do (or don't do) about it now can seriously affect how things turn out.

Given the urgency and magnitude of the problem, why don't we seem to be taking serious action?

If you feel similarly, I urge you to join in.

Syndicated 2008-10-24 16:37:40 (Updated 2008-10-24 17:19:27) from Dafydd

Control-click

The fact that you can use Control-click to open URLs in Gnome Terminal is not very discoverable. (Just clicking doesn't do anything; perhaps this is to avoid breaking text selection?) I can't remember how I found out about it myself, but somebody I pointed it out to recently was delighted that they didn't have to use the context menu to open URLs, so I think it deserves wider publicity.

Syndicated 2008-03-25 16:59:29 (Updated 2008-03-25 17:01:04) from Dafydd

Internet cloud

This is my new favourite depiction of the Internet, courtesy of RFC 908:

Given that the Internet is a bit like a game of Robot Finds Kitten, it only makes sense that it look like one. Alternatively, it's reminiscent of the swearing in Asterix, which is also appropriate.

Syndicated 2008-01-06 23:44:29 from Dafydd

do not confuse

 stationary stationery shop mobile stationery shop stationary mobile shop mobile mobile shop

Syndicated 2007-12-24 02:15:16 (Updated 2007-12-24 02:34:09) from Dafydd

17 older entries...