Skip to content

Instantly share code, notes, and snippets.

Shaun Kirk Wong skw

Block or report user

Report or block skw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8b9d7bb8f405d5ed493dff5bf49aae9b
trie-based siwtch:
match(arg)({
'this': () => console.log('this'),
'that': () => console.log('this'),
})(default)
match(arg)(
@skw
skw / .gitconfig
Created Nov 26, 2015
Git config aliases
View .gitconfig
[alias]
st = status
ci = commit
co = checkout
br = branch
unstage = reset HEAD --
last = log -1 HEAD
cleanup = "!git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d"
View snippets.md

git branch --merged master | grep -v 'master$' | xargs git branch -d

@skw
skw / pullrequest.md
Last active Aug 29, 2015
gh ticket templates
View pullrequest.md

#999

Reviewers:

  • @username1
  • @username2

Notes

  • Any relevant notes.

Changes

  • Brief summary of the changes made, in list form.
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@skw
skw / browserify.js
Created Feb 1, 2015
Gulp browserify watchify task(s)
View browserify.js
"use strict";
var gulp = require('gulp');
// plugins
var plumber = require('gulp-plumber');
var uglify = require('gulp-uglify');
var notify = require('gulp-notify');
var sourcemaps = require('gulp-sourcemaps');
// deps
var source = require('vinyl-source-stream');
@skw
skw / html.md
Last active Aug 29, 2015
Javascript Style Guide
View html.md

HTML Style Guide and Semanctics

Table of contents

@skw
skw / gist:7c41aa1ef5e05cfa7e94
Created Oct 29, 2014
OS X Sublime 3 CLI Setup
View gist:7c41aa1ef5e05cfa7e94
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
View node-watch-for-handlebars.js
watch = require('watch');
fs = require('fs');
var cmd = require('child_process').spawn('cmd'), myArgs;
console.log('watcher started');
myArgs = process.argv.slice(2);
myDir = myArgs[0];
outDir = myArgs[1] || '';
outDir = stripTrailingSlash(outDir);
You can’t perform that action at this time.