Last active
August 29, 2015 14:21
-
-
Save drunkel/883515699fb9042ab886 to your computer and use it in GitHub Desktop.
Things I always forget:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Execute a script in rails console | |
load './path/to/foo.rb' | |
#Stub constants in a file. Gotta put in quotes, because rails. | |
before :each do | |
stub_const('MyClass::FOO_CONSANT', some_value) | |
end | |
#Clean branches on remote that are merged to master | |
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d #Run from master, or like, delete all your stuff | |
git fetch --prune #sync your remote | |
#Set your OSX machine to UTC time | |
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime | |
# Generate a file of specific size from OSX command line | |
# eg. mkfile -n 2g filename # makes a 2gig file | |
mkfile -n size[b|k|m|g] filename | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment