JSONovich: Now with code-folding!
Thanks to a clean patch from Sean Coates, I'm releasing v1.5 of JSONovich. It now supports code-folding. Great hack, Sean!
Command-line shuffle
Being a nerd, I tend to like the command-line. When I'm working on my laptop at home, I tend to like listening to music. Before I discovered that mplayer had a really convenient shuffle idiom, I would invoke it thusly (to listen to all my Pavement tracks in shuffle mode):
export IFS=$'\n' for track in $(find /mnt/upnp/MediaTomb/Audio/Artists/Pavement -name \*.mp3 | ~/bin/shuffle.py); do mplayer $track; done
And the wee shuffle script I whipped together looks like this:
#!/usr/bin/env python # shuffle.py import sys import random args = list(sys.stdin) random.shuffle(args) sys.stdout.writelines(args)
And here's the convenient shuffle idiom that renders my arg-shuffling script somewhat useless:
find /mnt/upnp/MediaTomb/Audio/Artists/Pavement -name \*.mp3 | mplayer -playlist - -shuffle -loop 0
JSONovich emerges
JSONovich has now emerged from the Mozilla Add-ons sandbox and is available to the masses: http://addons.mozilla.org/en-US/firefox/addon/10122.
Lynx and HTTPS/SSL on Ubuntu (8.10)
Dear Future Me,
It has been a while, hasn't it? Yes, it has[1].
Did you try to view an HTTPS/SSL URL in Lynx[2] again, only to be met, most cruelly, with the following error message?
$ lynx https://example.org/resource/[3]
Alert!: This client does not contain support for HTTPS URLs.
Well, have no fear! The lynx package, at least within the aptitude repositories for Ubuntu 8.10 (Intrepid Ibex), has no SSL support as you have just witnessed. The lynx-cur package, on the other hand[4], does! Support SSL, that is. Fix yourself thusly:
$ sudo apt-get install lynx-cur
N.B. the new lynx looks for its configuration in a different place than the old lynx, so you may need to fiddle with things if you've tricked out lynx with bells and whistles and racing stripes and nitrous boosts. Otherwise, huzzah!
Notes
- In the future you will have evolved beyond answering your own questions, no doubt, but here in the past, in this quaint and backwards era, it is quite common to hold conversations with yourself. Or myself. But I (i.e., you) digress! (We digress in the past as well! Quite the confusing state of affairs, conversationally speaking!) [↩]
- Do they even have Lynx in that brave new world of the future? Does the lynx species still exist? Did the polar ice caps melt and wipe out all non-domesticated felines? Inquiring, unevolved minds of the past want to know! [↩]
- I am assuming that in the future example.org remains a reserved dummy domain. [↩]
- I hear that in the future hands will be replaced by hooks and detachable chainsaws and the like? [↩]
JSONovich update
JSONovich is now up to version 0.6. Recent revisions have added the following functionality:
- Reads in JSON and converts to UTF-8 for some naive Unicode handling
- Wraps long lines at the right edge of the window
- Adds a check to see if a native JSON parsing library is already loaded (as will be the case in Firefox 3.1). Uses that library if so, otherwise loads the module included in JSONovich.
- Handles JSON syntax errors more gracefully. Used to eat bad data and display nothing, but syntax errors (from the JSON parser) are now surfaced.
I've also tossed the source up on code.google.com for version control.
In the meantime, those of you who are using JSONovich can help increase its exposure by heading over to its entry at addons.mozilla.org, logging in, downloading, rating, and reviewing the extension. Reviews and ratings help get extensions "promoted" from the sandbox to the public site, which provides the ability for automatic updates when new versions of the extension are released.
