:The LSE seem to have had an unusually interesting speakers lately. Not sure if it’s an end-of-term twist away from serious economics towards the more accessible stuff. Žižek, Clay Shirky and Andrew Ross Sorkin, all in the space of a day; what a treat!
Month: July 2010
Patch: vi-style scrolling for the comix image viewer
Comix is my favourite no-bloat viewer for collections of images: not just for comics, but also for paging through a directory full of graphs or photographs. But needing to slip to the arrow keys for navigation is an irritation: hence this quick little patch to enable h,j,k,l scrolling. [I later realise that the h conflicts with another keyboard shortcut. So it goes]. This is in lieu of a large patch, which I’ll probably never write, allowing shortcut keys to be set from a config file.
Here on github — the first time I’ve used github in this way, and an impressively painless experience. I’m now itching to hack on other code that’s hosted there. [also, there’s probably a way of getting automatic github updates posted here, or to facebook, or something]
tail wagging the dog
AP, via Wired:
“This year, the Pentagon will employ 27,000 people just for recruitment, advertising and public relations — almost as many as the total 30,000-person work force in the
Patch: blogger post from stdin for googlecl
Going to start hijacking this blog, to record/link to patches I submit to various open-source projects. As with everything else on here, it’s mainly to ensure I can find these little snippets a few months later.
So, to start, something intended for this blog itself. A patch to the google commandline tools enabling the “google blogger post” command to post content read from stdin (adding to the current options of supplying a string or a filename). Usage is the traditional ‘-‘ in place of a filename.
This enables two pieces of functionality I’d find very useful:
A) filter content through other programs. e.g. using markdown to HTMLify my content:
$ markdown post.txt | google blogger post –
B) make a blogpost from within vim, by selecting my post content and piping it to googlecl
what is the ø in infinite thøught? Merely the philosophical counterpart to the Heavy Metal Umlaut? Or are we in the equally-depressing land of subtle and pointless theoretical in-jokes?
mysql file output is efficient — but needs the FILE permission, which mysql turns off by default for most users:
mysql> select foo into outfile '/tmp/bar.txt' from sometable group by foo;
While loving both
The Parallax View
All the President’s Men
, I’d somehow never realised that they had a forgotten sibling. Klute is the first member of what came to be known as director Alan Pakula’s
political paranoia trilogy
. One to watch.
While loving both _The Parallax View_ and _All the President’s Men_, I’d somehow never realised that they had a forgotten sibling. Klute is the first member of what came to be known as director Alan Pakula’s _political paranoia trilogy_. One to watch.
finding and editing
Search for files containing some text, open them in vim (one per tab)
grep -l foo ./* | xargs vim -p
Alternatively, to get a single-line list that can be edited and then copy-pasted to a command-line:
grep -l foo ./* | xargs echo
There are more heavy-duty ways of removing lines in output listed here, but I see little reason for using them.t
Leave a Reply