Skip to content

Instantly share code, notes, and snippets.

View tanepiper's full-sized avatar

Tane Piper tanepiper

View GitHub Profile
@tanepiper
tanepiper / clarg.md
Created January 4, 2012 15:50 — forked from pksunkara/clarg.md
Command Line Arguments Specification

Command Line Arguments Specification

This specification defines Command Line Arguments level 1 (CLARG 1.0). This document aims to direct development of command line tools conform to a set of rules while parsing options.

Arguments

The different type of arguments are:

  • Short Option
  • Long Option
#!/usr/bin/env node
var util = require('util'),
http = require('http'),
events = require('events'),
oauth = require('oauth').OAuth,
fs = require("fs"),
crypto = require("crypto"),
ws = require('websocket-server');
@tanepiper
tanepiper / stagecoach.markdown
Created February 4, 2012 01:39
hypothetical stagecoach cluster management commands

commands

remote

Save hub locations and passwords by name. Inspired by git remote.

$ stagecoach remote add mysite --hub=localhost:6000 --password=beepboop
@tanepiper
tanepiper / html5video.sh
Created February 14, 2012 12:14 — forked from jamesbjackson/html5video.sh
automated conversion of a file to all three html5 compatible video formats - h.264, ogg, and webm
#!/bin/sh
####################################
# Output file for HTML5 video #
# Requirements: #
# - handbrakecli #
# - ffmpeg #
# - ffmpeg2theora #
# #
# usage: #
@tanepiper
tanepiper / gist:1884587
Created February 22, 2012 12:18
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+X delete line
Ctrl+↩ insert line after
Ctrl+⇧+↩ insert line before
Ctrl+⇧+↑ move line (or selection) up
@tanepiper
tanepiper / gist:1887182
Created February 22, 2012 20:54 — forked from axelav/gist:1839777
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
import org.json.*;
import java.net.*;
import java.util.Iterator;
PImage bg;
JSONObject data;
double west = -3.414001;
double east = -3.017120;
@tanepiper
tanepiper / horrible.js
Created February 28, 2012 22:51 — forked from tmpvar/horrible.js
javascript: hackery in jsdom
var jsdom = require('jsdom');
window.log = console.log;
var window = jsdom.jsdom('<a href="javascript:log(\'clicked!\');">click me</a>').createWindow();
var a = window.document.getElementsByTagName('a')[0];
a.addEventListener('click', function(e) {
if (e.target.href.substring(0,10) === "javascript") {
window.run(e.target.href.substring(11), 'click-handler');
}
});
@tanepiper
tanepiper / gist:2039373
Created March 14, 2012 20:44 — forked from anonymous/gist:2039312
SASS mixins for roundcorners
// Example of a whole load of mixins to make round corners
// (including individual corners) easy to remember in SASS
@mixin roundcorners($radius) {
-moz-border-radius: $radius; // firefox
-webkit-border-radius: $radius; // safari/chrome
border-radius: $radius; // CSS3, works in IE9
}
@mixin roundcorner1($radius, $corner: "top-left") {
-moz-border-#{$corner}-radius: $radius ; // firefox
@tanepiper
tanepiper / hack.sh
Created March 31, 2012 14:22 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#