Monday 3 November 2014

Ubuntu Cloud Images now available for Google Compute Engine

I'm really pleased to announce that Ubuntu is now a supported platform on Google Compute Engine. There are currently images available for 12.04 LTS, 14.04 LTS and 14.10. You can read more about the launch and how to get started in utlemming's blog postGoogle's announcement or the Google Compute Engine documentation.

Friday 1 August 2014

Setting up a Stellar trust line

Recently Stellar, a decentralized protocol for sending and receiving money in any pair of currencies, was announced. I decided to have a play around (because why not?). A core concept to Stellar is that of a gateway; an individual or organisation that takes a deposit (in 'real' currency) and credits you on the network.

Coinex are a New Zealand-based gateway, and are the first gateway for Stellar; they put up a challenge to be the first person to use them as a gateway (which I won!). To do this, you have to say that you trust that gateway to hold a particular amount of currency; in this case I wanted to publish the fact that I trust Coinex to hold up to $20 NZD for me.

To do this, you'll need to interact directly with the API (Stellar clients are still playing catch-up), and submit the following JSON:
    "method": "submit",
    "params": [
            "secret": "<SECRET>",
            "tx_json": {
                "TransactionType": "TrustSet",
                "Account": "<your Stellar address>",
                "LimitAmount": {
                    "value": "<the amount you trust the issuer to hold>",
                    "currency": "<the currency the issuer will hold>",
                    "issuer": "<the issuer's Stellar address>"
You can find <SECRET> on your Stellar settings page; everything else will obviously depend on what you're trying to do.

WARNING: POSTing your secret to is potentially insecure; you would be better off signing requests locally; a blog post on this may be forthcoming.

You'll then need to POST this to the API:
curl -X POST -d'<JSON>'
There's a bug in Stellar that means that newlines and/or indentation cause problems, so you'll need to make the above JSON just a single line and slot it in to the above command line.

Once you run that, you're done!

Friday 16 May 2014

Push It!

Earlier today, Alex Couper presented me with a challenge on a captainhook issue:
I want to play "push it" by salt n pepa on every push.
Challenge accepted.

If you are using a sufficiently recent version of git (i.e. one which supports the pre-push hook) and have youtube-dl, mplayer and curl installed, then dropping this in to .git/hooks/pre-push for a repo will play Push It (in its entirety) on every push:

curl -s "$(youtube-dl -g\?v\=vCadcBR95oU)" | mplayer -really-quiet -cache 8192 -vo null - > /dev/null 2>&1 &