Rename Google Drive folder on Mac

2014-03-06 15:49:22
  1. Quit Google Drive app
  2. Rename "~/Google Drive/" to whatever you want
  3. Open Google Drive and wait for it to complain the folder is missing
  4. Click the menu item and click the warning item
  5. Click "Locate Folder.." button on the right in window that pops up
  6. Find your renamed folder and hit OK
  7. There is no step seven

Add to iCloud Reading List programmatically

2013-12-16 22:26:31

One piece of a larger puzzle I'm trying to solve currently, was how to add a given URL to my Apple "Reading List" that is stored in iCloud and synced across all my OS X and iOS devices. More specifically, I wanted to add URLs to the list from my mac running Mavericks (10.9). I had a quick look at the Cocoa APIs and couldn't see anything in OS X to do this. (iOS has an API to do it from Cocoa-land it seems though.)

I figured Safari.app was the key to getting this done on OS X, given it has the ability itself to add the current page to the reading list, either via a keyboard command, a menu item, or a button in the address bar. One quick mental leap later, and I was wondering if the engineers at Apple had been nice enough to expose that via Applescript for me to take advantage of.

One quick stop in "Script Editor.app" later, and I had the Applescript dictionary open for Safari.app. Lo and behold, there is rather handily an Applescript command called "add reading list item", which does exactly what I want. It has a few different options you can call it with, depending on whether you want Safari to go populate the title & preview text, or if you want to specify it yourself at save-time.

As I want to be able to call this from multiple runtimes, I've chosen to save it as an executable, which leans on osascript to run the actual Applescript. And here it is:

#!/usr/bin/env osascript

on run argv
    if (count of argv) > 0
        tell app "Safari" to add reading list item (item 1 of argv as text)
    end if
end run

Save it as whatever you want (eg. add_to_reading_list), make it executable (chmod +x add_to_reading_list), and then run it with the URL you want saving as the first argument.

$ add_to_reading_list "http://caius.name/"
$ add_to_reading_list "http://google.com/"
# … etc …

(Adding support for specifying preview text and title is left as an exercise for the reader!)

Have fun reading later!

Happy Villanelle

2013-02-22 15:15:03

The writing group that Carole and Liberty belong to had a homework this month to write a Villanelle. It's a very specific kind of poem, written to both a repeating line structure and a rhyming pattern. (If you go read Liberty's villanelle she explains it properly at the start.)

However, after reading both Carole's and Liberty's, I was feeling they'd both done very depressing poems. It might be a strict structure of poem, but there's no need to make the subject matter so down!

So here's my overly enthusiastically attempt to try and balance the world of villanelle's into something less depressing!

Striding out down the street at last,
Like I own this town,
Tipping my hat to all that I passed.

Smiling at a friendly chugger who asked,
Grinning at an exuberant clown,
Striding out down the street at last.

Saluting the bookie behind his glass,
Turning frowns upside down,
Tipping my hat to all that I passed.

Tapping my feet and having a blast,
Abusing verbs like they were a noun,
Striding out down the street at last.

Being amused by kids playing on grass,
Seeing the queen in her glorious crown,
Tipping my hat to all that I passed.

Compared to sadness I am a contrast,
Cheering folk up in my dressing gown,
Striding out down the street at last,
Tipping my hat to all that I passed.

Pair new device with Nexxus Drive Transmit Pro

2013-02-12 18:26:59

The device is a bluetooth to FM transmitter with Model number NEX-FMTX-BTCK. (Hereafter DTP.)

The set of instructions I use to pair it to a new device, having lost the user manual/instruction booklet, is as follows:

  1. Remove all previously paired devices from range (turn them off/move them away from the DTP.)
  2. Turn the power on to the DTP without touching any buttons.
  3. Let it flash the blue call button a couple of times as it searches for known devices.
  4. Hold the call button down until the call/hangup buttons flash blue/red respectively.
  5. Find the "Drive Transmit Pro" on your device you want paired to it and pair with DTP.
  6. Test out the pairing by calling your girlfriend and talking to her in a funny accent.
  7. Celebrate with a beer!

Church intertwined with State

2013-02-05 23:06:18

In the UK currently we're moving (slowly) toward the same sex marriage bill making it's way into law. (It's got a way to go still, but support seems to be there now at least.)

For the record, I'm glad to see the state moving toward allowing two people to be united under law, irrespective of terminology used - and with equal rights to those currently enjoyed by the uniting of a man & woman to date. But for a while now I've been thinking that the discussion is presented in an unclear fashion, which causes people to jump to polarising positions on it, without any common ground.

The way I see it is the UK has been a country with Religion and State intertwined for many, many hundreds of years - and therefore we have some constructs that exist both in law, and religion, but are conflated under one word and changing one appears to be changing them both.

The Church of England is Protestant, because Henry VIII wanted to get a divorce and the Catholics wouldn't allow him that, so we as a country "forked" our own religion that wasn't so different, but allowed divorce of marriage. Times were slightly different back then, the church had a lot more direct power in terms of laws & how people lived. We're a more diverse society today, and the church has less (direct?) involvement in our laws, although older laws are still based upon that original conflation of state and church.

I almost wonder if in this case (and others) we need to start diverging church from state and allowing the state to change things irrespective of the church, whilst still allowing the church to continue unhindered with practices it's held for many years. Seems like the best of both worlds almost - in law we are a very generic and equal society, and if you wish to belong to or align with a group that has more specific beliefs, then that is open to you as well.

Lets jump back to gay marriage here as an example then. If we define state marriage to be "the unity of two human beings, irrespective of their attributes", then everyone is equal to join with a partner in the eyes of the law, and all such partnerships are afforded the lawful benefits that come with that unity. The church (and indeed, all religions) are also then free to define religious marriage in their doctrine as they wish, so they can say that for them it's only permissible between a man and a woman. And if you wish to join with a partner following that doctrine, then you have to meet their rules.

In this circumstance, I wonder how much of it is a hangup on the word "marriage". I can see how the state wants to keep hold of it to describe partnerships between two people, and also that religions want to keep hold of it as they've been using it for years and neither wish to yield the word for the other to use. Which possibly means people think solely of this issue as just being an intertwined construct between state and religion, and not as the state giving everyone equality being a separate issue.