Skip to content

Instantly share code, notes, and snippets.

View ddeyoung's full-sized avatar

Dustin DeYoung ddeyoung

  • Indianapolis, IN
View GitHub Profile
@ddeyoung
ddeyoung / 1. Install Bash Completion
Created October 18, 2011 01:12
Set git autocompletion and PS1 integration
# Install bash completion
$ brew install bash-completion
# Install Homebrew's own completion script:
$ ln -s "/usr/local/Library/Contributions/brew_bash_completion.sh" "/usr/local/etc/bash_completion.d"
@ddeyoung
ddeyoung / remove_all_gems_cli
Created October 21, 2011 14:36
Remove all installed gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
@ddeyoung
ddeyoung / rate_limit_osx
Created October 28, 2011 15:49
Limit Connection Bandwidth on OS X 10.6 (ipfw)
sudo ipfw pipe 1 config bw 300kbit/s
sudo ipfw add pipe 1 dst-ip 0.0.0.0/0
sudo ipfw flush
@ddeyoung
ddeyoung / remove_dsstore
Created February 20, 2012 15:58
Remove all .DS_STORE files from the current and child directories.
find . -name '*.DS_Store' -type f -delete
@ddeyoung
ddeyoung / .bash_profile
Created May 22, 2012 18:36
Grails Environment Switching
# GRAILS
GRAILS_CELLAR=/usr/local/Cellar/grails
GRAILS_BIN=/usr/local/bin/grails
GRAILS_START=/usr/local/bin/startGrails
GRAILS_DEBUG=/usr/local/bin/grails-debug
GRAILS_CURRENT=$GRAILS_CELLAR/current
usegrails() {
gversion=$1
if [ -d $GRAILS_CELLAR/$gversion ]; then
@ddeyoung
ddeyoung / grails_dynamic_url_mappings.groovy
Created December 7, 2012 16:09
Grails URL mapping Based on dynamic request properties
"/path/to/stuff"(controller:"controller", action: "action"){
param={
def rtn = "get"
switch(request.method) {
case "GET":
rtn = "get"
break
case "PUT":
rtn = "update"
break
@ddeyoung
ddeyoung / gist:5502723
Last active July 21, 2017 16:27
Enable comment toggling in Sublime Text 2 for Groovy on OS X
Copy the Java comment config file to the Groovy directory
cp ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Java/Comments.tmPreferences ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Groovy/
Edit ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Groovy/Comments.tmPreferences
Change line 8
<string>source.java</string>
@ddeyoung
ddeyoung / secret_input.rb
Last active December 17, 2015 13:48
Get command line input without displaying the input as it's entered.
require 'io/console'
STDIN.noecho(&:gets)
@ddeyoung
ddeyoung / gist:6529113
Created September 11, 2013 20:11
Disable grails events in tests.
Domain.metaClass.event = { arg1, arg2, arg3 ->}
@ddeyoung
ddeyoung / gist:7169861
Created October 26, 2013 14:07
Create Mavericks Bootable Installer
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume Mac\ OS\ X\ Install\ ESD/ --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeractio