Skip to content

Instantly share code, notes, and snippets.

View ammonkc's full-sized avatar

Ammon Casey ammonkc

  • nCino, Inc.
  • Honolulu, Hi
View GitHub Profile
#!/usr/bin/ruby
# Sifttter: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 53
# * Scans leading timestamps in each line matching today's date
# * Does not alter text files in any way
# * Changes ampersand ('&') to 'and' so the script keeps running
# toggle iTerm Dock icon
# add this to your .bash_profile or .zshrc
function toggleiTerm() {
pb='/usr/libexec/PlistBuddy'
iTerm='/Applications/iTerm.app/Contents/Info.plist'
echo "Do you wish to hide iTerm in Dock?"
select ync in "Hide" "Show" "Cancel"; do
case $ync in
'Hide' )
/*
---
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
...
*/
#! /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
# 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
@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
@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 / 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