Skip to content

Instantly share code, notes, and snippets.

View peelman's full-sized avatar

Nick Peelman peelman

View GitHub Profile
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 4.0 of October 23, 2014
namespace :assets do
desc "Display asset path"
task :paths => :environment do
Rails.application.config.assets.paths.each do |path|
puts path
end
end
end
@peelman
peelman / 0_reuse_code.js
Created January 20, 2014 13:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@peelman
peelman / underpressure.js
Created October 7, 2013 19:48
Code Results from Under Pressure
function doubleInteger(i) {
// i will be an integer. Double it and return it.
i = i*2
return i;
}

Ruby Global Setup

  1. Install homebrew.
  2. brew install rbenv ruby-build
  3. echo 'eval "$(rbenv init -)"' >> $HOME/.bash_profile
  4. rbenv install 2.2.0
  5. rbenv global 2.2.0
  6. rbenv rehash
  7. gem install bundler rails
@peelman
peelman / gist:3170689
Created July 24, 2012 15:32 — forked from tonyarnold/gist:3162762
Git config aliases for markdown release notes
[alias]
co = checkout
tagsbydate = for-each-ref --sort=-taggerdate --format='%(refname:short)' refs/tags
previoustag = !sh -c 'git tagsbydate --count 2 | cut -f2 | sed -n 2p'
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
markdownlog = log --color --pretty=format:'* %s `%Cred%h%Creset` - %C(bold blue)[%an](mailto:%ae)%Creset' --abbrev-commit --dense --no-merges --reverse
releasenotes = !sh -c 'git markdownlog ...`git previoustag`'
tree = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --decorate"
fix = "commit --amend -C HEAD"
di = "diff --color"
@peelman
peelman / traceroute
Created July 10, 2012 17:28
MediaTemple Traceroute
My IP 199.66.67.83
traceroute to media.alfredapp.com (205.186.187.196), 64 hops max, 72 byte packets
1 router (192.168.0.1) 2.565 ms 2.380 ms 2.226 ms
2 10.194.48.3 (10.194.48.3) 8.981 ms 11.225 ms 7.986 ms
3 10.192.0.4 (10.192.0.4) 8.239 ms 9.902 ms *
4 69.174.129.30 (69.174.129.30) 11.136 ms 8.505 ms 7.980 ms
5 66.62.16.9 (66.62.16.9) 13.233 ms 17.418 ms 15.681 ms
6 lax1-core-02.360.net (66.62.3.5) 55.225 ms 13.259 ms 15.662 ms
@peelman
peelman / flagWithReminder.scpt
Created June 27, 2012 05:08
Alfred Extension: Flag a Message with Reminder
-- Flag a Message and Set a Reminder
-- https://gist.github.com/3001622
-- ©2012 Nick Peelman http://peelman.us
--
-- Thanks to Don Southard for his Create Reminders Task
-- http://dirtdon.com
set tomorrow to ((current date) + (1 * days))
tell application "Mail"
set manyMessages to selection
repeat with aMessage in manyMessages
@peelman
peelman / bbdiff
Created May 22, 2012 21:12
Use TextMate to impersonate BBEdit for use with GitBox
#!/bin/bash
diff -u $1 $2 | mate -w