Cau Dy Geg

Jun 16

The Rules

Jun 15

Jerry Brito: Top ten myths about introverts -

So accurate …


Myth #1 – Introverts don’t like to talk.
This is not true. Introverts just don’t talk unless they have something to say. They hate small talk. Get an introvert talking about something they are interested in, and they won’t shut up for days.

Myth #2 – Introverts are shy.
Shyness has nothing to…

(via jerrybrito)

Oct 16

Strongspace uploads and URL shorteners

Jeff Mancuso of Strongspace cleaned up some Brett Terpstra shell script fu for quick and dirty hosting and generating shortened URLs on the Strongspace Blog last week.

I’ve been using a similar (much nastier!) script for a few years now, I found it very convenient in training situations to drop files on Strongspace/Dropbox and hand out easy to write URLs to delegates. Seeing the cleaner form of Bretts/Jeffs script has caused me to retire my old hack, but not until I’d switched the URL shortener to, my shortener of choice.

So, with appropriate props to the earlier code, here is a variation of the code which I posted in the comments over there, but record here for my poor memory:

function sshare () {
  scp "$1" ss:/strongspace/your_username/public
  tiny=$(curl -s --data-urlencode "longUrl=$url" \
                 --data-urlencode "login=XXXXX" \
                 --data-urlencode "apiKey=XXXXX" \
                 --data-urlencode "format=txt"
  echo $tiny | pbcopy && echo $tiny

Where your login and apiKey values can be retrieved from after login via the url ( accounts are free, so if you want a new account signup at first!).

To subsequently see click-thru info on the URL that is generated, add a + to the end of the shortened URL.

BTW, now that has acquired, you can drop an all important 2 extra characters out of those URLs as well …

Jul 24

Sun Secure Global Desktop (SGD) v4.4/4.5 from an OSX 10.5+ system

SSGD utilises X11 to enable the background connection and authentication. Since release 10.5 of OSX thru to the latest 10.6.4 there has been an issue with lack of keyboard input in the X11 authentication dialogs which X11 pops up.

This is due to a change in OSX X11 configuration and can be resolved by installing XQuartz (which is quite disruptive) or remaking a missing symlink from the current distribution … much the simpler option.

Lets see if I can find this hint next time I’m stuck on a freshly installed OSX machine …

[~] ➔ ls -al /usr/X11/share/X11/XKeysymDB
-rw-r--r--  1 root  wheel  8982 11 Feb 21:57 /usr/X11/share/X11/XKeysymDB
[~] ➔ ls -al /usr/X11R6/lib/X11/XKeysymDB
ls: /usr/X11R6/lib/X11/XKeysymDB: No such file or directory
[~] ➔ sudo ln -s /usr/X11/share/X11/XKeysymDB /usr/X11R6/lib/X11/XKeysymDB
[~] ➔ ls -al /usr/X11R6/lib/X11/XKeysymDB
lrwxr-xr-x  1 root  wheel  28 24 Jul 18:40 /usr/X11R6/lib/X11/XKeysymDB -> /usr/X11/share/X11/XKeysymDB
[~] ➔ 

That should fix it!

Jul 02

OSX disk recovery

So, something is wreaking havoc on the stability of my OSX 10.6 installation, causing filesystem corruption, even though its a journaled filesystem. So, whilst I track down the culprit (leaning toward the Seagate Momentus 500Gb drive at the mo!), a few reminders of useful bits and pieces …

So, hopefully I’ll eliminate the issues and if it turns out to be the Seagate Momentus, probably return that for RMA, but after many years of good luck with hard drives, this will be the 2nd Momentus 500Gb that has been in this system and failed — never had any issues with the earlier 200Gb and 320Gb models …

Jun 12 iPhone multitasking and background updating -

One of my most common feature requests is for Instapaper to periodically download articles in the background. A lot of people forget to launch the app to let it download content before going underground or boarding a plane.

I’ve already received multiple emails from people who are excited for iOS…

Marco making perfect sense again …

Jun 09

SafariRestore by Russell Gray -


Here’s an extension a lot of people have been waiting for: it automatically restores your previous browsing session.

At the moment, the MIME-type is set incorrectly on the extension itself; instead of clicking on it, right-click the link and choose “Save Linked File As…”, then double-click it in Finder (or in Explorer, for Windows users) to install it.

Few glitches with v1.0 (ie/ ignoring multiple windows at restore), but looking good as one of a raft of replacements for Glims functionality in the older Safari 4 world.

May 21

Transferring Adobe Digital Editions (ADE) DRM’ed eBooks to iPad

I’m posting this here so that I can find it in the future when I need it again and also so that hopefully Google will shorten the process for anyone that follows along after me down this weary path …




Apple have decided on epub as their chosen format for their iBooks application to store/retrieve eBooks, this is to be applauded as epub is an open standard (a little in flux still) and little more than styled HTML, so we expect great things to come. Whilst books generally bought from the Apple BookStore will be DRM encumbered with FairPlay (same system as deployed for their music), addressing that is for another day, the focus here is on Adobe DRM encumbered eBooks. Apples BookStore is still a little light on book content and hence many people have eBooks purchased through other means, Kindle, Sony Readers, Nook, PC/Mac, etc. I’d expect Adobe to be a popular choice …

It’s making some of these available to iPad viewing I’m interested in … some of the more enlightened eBook publishers—-O’Reilly obviously spring to mind here—provide non-DRM encumbered electronic copies of books and/or mechanisms to convert your dead tree purchases into electronic form at reduced rates. The advantages of no DRM on the eBook is flexibility for the owner/reader, they are free to choose their reader/platform of choice and possibly even to pass on the book at a later stage.

Much of the publishing industry is wedded to an Adobe biased delivery workflow (Adobe Content Server), particularly where the production of eBooks is concerned as Adobe has provided them with a suitable container in either PDF or epub for distribution. Most importantly not only have they provided the container, but also appropriate delivery mechanisms for providing a “secure” copy of the publication to the customer.

In Adobe terms, you purchase an eBook and the publisher delivers to you a small .acsm file. This is an Adobe Content Server Message file, which is only applicable to an Adobe desktop tool called Adobe Digital Editions (ADE). ADE is effectively the delivery point for your eBook, your .acsm file is a pointer only to the available download of your eBook from the publisher, in the process of retrieving the actual book from the publisher it is DRMed using a unique key to prevent its viewing or passing to others after you obtain the book.

This in effect ties the book content to you and more annoyingly, to storage and viewing within only the ADE application. As a Mac user, that is particularly annoying as Adobe desktop tools are a pain to install, poorly integrated on OSX and nearly unnecessary for most desktop users with PDF being so well integrated into the OS. Whilst Apple’s own Preview is operationally a much better tool than Reader for most day-to-day tasks..

So, where next …

As an Apple iPad user, I particularly want to take advantage of viewing/reading my books on the iPad and as I’ve paid legitimately for the content, I’m interested in removing any barriers to my enjoyment of my books in that way, namely the DRM on the eBook held in ADE prevents me from just dragging it into iTunes and enjoying it in iBooks.

Well, it did …

What to do …

ADE holds two forms of eBooks; epub and PDF. In both cases the files are stored in open view, in my case ~/Documents/Digital Editions contains each of the DRM encumbered epubs. Just dragging them to iTunes will attempt to transfer them but you’ll find that on sync, iTunes will report that the files are protected and refuse the operation.

So, we need to obtain the key necessary to decrypt the DRM encumbered epub and re-write any epub in a non-DRM format, then possibly tidy up or supplement any metadata in the epub before adding it to iTunes. Thankfully, using a combination of openssl and python, retrieving the key is handled by a short script.

ADE uses a mechanism called ADEPT for its DRM, storing the key in your installation of ADE on the desktop, as all of your purchases will be encrypted with this key, it is both vital and unlikely to change much in the future … so grabbing a copy now and archiving it will potentially be useful until such time as adobe decide to change everybodies keys worldwide (hopefully never!).

Once we have the key available, we need to decrypt the epub or PDF, writing a new version of the document into a non-DRM container. This task is accomplished with a Python script, which utilises the pycrypto library to apply the key decryption to your epub.

FInally, our non-DRM epub is available, but some of the important (but optional) metadata, such as a cover, etc may be left behind in ADE, to re-provision these you can utilise a freely available eBook tool called Calibre, which allows metadata editing and updating.

If you’ve got this far, you are one step from total success, drag the final epub from the workflow into iTunes and sync your device, a couple of seconds later you should be reading your book in peace and quiet on the iPad.

The gory details for OSX

The original process for the task below can be found at, this is to pull out the OSX specifics and some pointers to modified working scripts for OSX 10.6.3 users.

This works for me, running:


  1. Install the optional 10.4 SDK into current Xcode, this prepares some necessary tools for the later Python/pycrypto toolset.

  2. Download and install the Python 2.6.5 DMG, Apple deliver 2.6.1 and it doesn’t support the pycrypto library we need.

  3. Download pycrypto 2.1, extract it and install it.

    $ python build

    $ python install

  4. Install ADE 1.7.2. Registering this with Adobe enables you to share DRMed ebooks across all registered machines (under ADE of course, upto 6 machines), as we’ll be removing DRM you might forgo this. Your key is already available after install, creating and uploading to Adobe just makes it resilient (in the face of you destroying your installation). So choose, whether to register or not, it only affects your future recovery, not the ability to read or process books.

  5. Download your publication (ie. get an .acsm file from publisher), launch it, ADE will then download the epub to its silo.

  6. Obtain the 3x Python scripts you require (Google them … BTW, the versions are minimums to work!):

  7. Run python, which will generate an adeptkey.der, this is your personal ADEPT keyfile (binary), so keep it safe. Archive a copy now for reference.

  8. With the keyfile in hand, we now run python ineptepub.pyw or its sister script. This will pop up a small window asking for the location of three files, the existing keyfile we created in step. 7, the epub in its current DRM form (typically stored in ~/Documents/Digitial Editions and a filename for the new epub to be created as a result of decryption.

  9. A few seconds later you should have a new non-DRM encumbered epub (or PDF).

  10. [Optionally] Drag the new epub into Calibre and tidy up its metadata, add covers, etc.

  11. Drag the epub file created above into iTunes, which should recognise it and add it to the ebook list, more importantly sync your iPad and start reading!

All the hard work here has been done by others, I just thought the OSX variation should be a little more simply explained given the number of iPad users and the paucity of ebooks in the UK store … until Apple right that on May 28th I’ve happily downloaded a number of current titles in Adobe DRM epub format from The Book Depository, no affiliation, just a very happy client.

May 04

MarsEdit v3.x

So MarsEdit v3.0 has made it out the door, quite the best blog editor I’ve yet come across, since its beginnings as an addendum to NetNewsWire and Brents re-homing and subsequent flourishing at RedSweater Software … look no further if OSX is your choice of platform.

Onward and iPad bound (I hope …), congratulations Daniel.

Apr 07