Skip to content

Instantly share code, notes, and snippets.

View ammonkc's full-sized avatar

Ammon Casey ammonkc

  • Broken.Paradigm.Labs
  • Honolulu, Hi
View GitHub Profile
@ammonkc
ammonkc / ST2_shortcuts.md
Last active December 16, 2015 16:19 — forked from nuxlli/sublime_text_2_useful_shortcuts.md
[ST2] Sublime Text 2 - Useful Shortcuts #ST2 #cmd

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t : go to file
  • super+ctrl+p : go to project
  • super+r : go to methods
*filter
# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT
# Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
@ammonkc
ammonkc / mkv2m4v.sh
Created September 27, 2012 03:01 — forked from tekkub/mkv2m4v.sh
Shell: mkv to m4v remuxer
#!/bin/bash
#
# mkv2m4v inputfile.mkv
#
# Given an MKV container with H.264 video and AC3 audio, converts
# quickly to an iPad-compatible MP4 container without re-encoding the
# video (so it must already be in an iPad-compatible resolution); the
# audio is downmixed to stereo with Dynamic Range Compression.
#
@ammonkc
ammonkc / gist:1094266
Created July 20, 2011 03:24 — forked from guyht/gist:1012516
JS: JSHint through NodeJS
#!/usr/bin/env node
/*
* Takes a list of files and runs them through JSHint
*
* Usage:
* check.js file1 file2 file3
*/
var fs = require('fs'),
@ammonkc
ammonkc / gist:1094254
Created July 20, 2011 03:12 — forked from founddrama/gist:1013614
Git-Hook: pre-commit jshint
#!/bin/sh
# A pre-commit hook for git to lint JavaScript files with jshint
# @see https://github.com/jshint/jshint/
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904