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
#!/usr/bin/ruby | |
# Finds the difference between a file and X changes ago | |
# gitdifflast path/to/file 2 | |
# would be the difference between this version and two changes ago (when the file actually changed not just commits) | |
# this distinguishes between the last change and the last commit | |
# use "git diff HEAD@{1} path/to/file" or "git diff HEAD^ path/to/file" for that | |
file = ARGV.shift | |
change_increment = ARGV.shift.to_i |
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
cd project | |
rvm --rvmrc --create 1.9.2@project | |
cd ../project # confirm rvm with y | |
ruby -v # confirm version |
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
# minimize the use of these for better copy | |
# am,is,are,was,were,be,being,been,become,became,has,have,had,do,does,did,may,might,must,can,could,shall,should,will,would | |
\Aam\A\|\Ais\A\|\Aare\A\|\Awas\A\|\Awere\A\|\Abe\A\|\Abeing\A\|\Abeen\A\|\Abecome\A\|\Abecame\A\|\Ahas\A\|\Ahave\A\|\Ahad\A\|\Ado\A\|\Adoes\A\|\Adid\A\|\Amay\A\|\Amight\A\|\Amust\A\|\Acan\A\|\Acould\A\|\Ashall\A\|\Ashould\A\|\Awill\A\|\Awould |
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
git reset --soft HEAD^ # when you just committed something you didn't mean to and you want to change the contents and the message | |
git commit --amend # when you want to change the commit message you just made | |
git reset file # when you have a file staged for delete that you want to unstage | |
git checkout file # when you want to restore that file you unstaged file to it's original version | |
git reset HEAD file # when you want to unstage a staged change | |
git reset --soft "HEAD^" # when you just committed something, but you want to undo the commit and revert everything to how it was staged before the commit |
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
service = angular.element(document).injector().get('cubeService') | |
service.track('plb_test', {'hi' : 'nathan'}) |
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
Verifying that +nahurst is my openname (Bitcoin username). https://onename.com/nahurst |
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
# set these in your .bash_profile, .bashrc, .zshrc first | |
HISTFILESIZE=100000 # how many lines to keep total | |
HISTSIZE=100000 # how many lines to keep for the current session | |
# oh-my-zsh will default to a reasonable 10000, but most bash defaults to a few hundred | |
# oh-my-zsh by default appends all commands to history after they are run instead of on session end | |
# search the history with control-r | |
# search for commands starting with the one you typed with alt-p | |
# if you don't want something to stay in your history, prefix the command with a space |
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
<html ng-app="myApp"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Basic App</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> |
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
# because we don't have findsn with fslint, we need to do it ourselves | |
# find . -type f -exec basename {} \; | \ # get the name of the file. could be substituted to do hashes here | |
# sort | \ # prep for counting | |
# uniq -c | \ # count occurences | |
# grep -v "^[ \t]*1 " | \ # mind the formatting | |
# awk '{print $2}' | \ # get only the file names, not the counts | |
# xargs -I {} find . -name '{}*' # find the location of the duplicates | |
find . -type f -exec basename {} \; | \ |
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
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |