Skip to content

Instantly share code, notes, and snippets.

View christiansmith's full-sized avatar

Christian Smith christiansmith

View GitHub Profile
const crypto = require('./src')
const {ab2str,str2ab,ab2buf,buf2ab} = require('./src/encodings')
const base64url = require('base64url')
let jwk = {
kty: "RSA",
use: "sig",
alg: "RS256",
# Remap prefix key to work better with caps lock as ctrl
# set-option -g prefix C-a
# unbind C-b
# Change the default delay
set-option -sg escape-time 1
# Enable mouse to switch panes
set-option -g mouse-select-pane on
set-option -g mouse-select-window on

Run the connector code:

$ node lights.js

Send the message over Meshblu.

$ curl -X POST 192.168.1.15/messages -d '{"devices": "f8dc6ce0-774d-11e4-abf3-bf664a7992ae", "payload": { "on": true } }' -H 'skynet_auth_uuid: {UUID}' -H 'skynet_auth_token: {TOKEN}'
var five = require('johnny-five')
, meshblu = require('meshblu')
, led
;
var conn = meshblu.createConnection({
uuid: '13c34d70-7682-11e4-abf3-bf664a7992ae',
token: 'izv1m06rgooe0zfrf1nujpen9d3zyqfr',
server: 'http://192.168.1.15'
});

Keybase proof

I hereby claim:

  • I am christiansmith on github.
  • I am christiansmith (https://keybase.io/christiansmith) on keybase.
  • I have a public key whose fingerprint is 3E90 83E8 3224 7BCD B36D 929F D2DF C893 B633 AB26

To claim this, I am signing this object:

@christiansmith
christiansmith / README.md
Last active August 29, 2015 14:01
advice command

Advice

Reliable advice, whenever you need it, based mostly on the timeless wisdom of South Park.

Install

$ cd ~/usr/local/bin
$ sudo curl -O https://gist.githubusercontent.com/christiansmith/d2631c33158bc557196f/raw/80f6982adef9f167073084f43dea148015804aae/advice
$ sudo chmod a+x advice

Install Android SDK

Download the ADT Bundle.

Unpack the zip file to $HOME/bin/adt-bundle and add the sdk to your $PATH environment variable.

export PATH=$PATH:$HOME/bin/adt-bundle/sdk/platform-tools
export PATH=$PATH:$HOME/bin/adt-bundle/sdk/tools
sip = 1
slurp = 2
gulp = 3
class EarlyRiser
constructor: (@config) ->
@caffeinated = false
@cupsRequired = @config.cupsRequired
@cupsConsumed =
# ...
practice ()
{
practicedir=~/Projects/practice/$(date +%Y-%m-%d)/$1
mkdir -p $practicedir && cd $practicedir
echo ""
echo "Welcome to $practicedir"
echo ""
echo "May you become less dumb through deliberate practice."