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 / 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
@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 / 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.
#
*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 / 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
@ammonkc
ammonkc / .gitignore
Created June 21, 2013 19:34
[ST3] gitignore boilerplate #laravel
/bootstrap/compiled.php
/vendor
composer.phar
composer.lock
.DS_Store
/public/assets/cache/*.js
/public/assets/cache/*.css
.vagrant
Vagrantfile
*.orig
@ammonkc
ammonkc / ST3_shortcuts.md
Created June 21, 2013 19:47
[ST3] Sublime Text 3 - #keybindings #cmd

Sublime Text 3 - Useful Shortcuts (Mac OS X)

ST3 Keybindings - User

command Description
⌃S Toggle Side Bar
⌥ Tab Move Forward by character

Open/GoTo

@ammonkc
ammonkc / .gitattributes
Created July 9, 2013 18:13 — forked from dhrrgn/.gitattributes
gitattributes #git
# Ensures all line endings are committed as LF, but will checkout with native line endings
* text=auto
# -- Override Section, just in-case Git tries to be sneaky
# Ensure that these files are recognized as text
*.asp text
*.aspx text
*.asx text
*.c text
# Capistrano Laravel 4 Deployment Tasks
# Watts Martin (layotl at gmail com)
# https://gist.github.com/chipotle/5506641
# updated 12-Jul-2013
# Assumptions:
#
# - You are using a .gitignore similar to Laravel's default, so your
# vendor directory and composer(.phar) are *not* under version control
# - Composer is installed as an executable at /usr/local/bin/composer
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
import getopt
#
# Show Usage, Output to STDERR