Skip to content

Instantly share code, notes, and snippets.

View sublimecoder's full-sized avatar

Jared Smith sublimecoder

View GitHub Profile
#!/bin/bash +x
MYDIR=/home/username
# force load new code
cd $MYDIR
git fetch origin
git reset --hard origin/master
# move domain specific files
@sublimecoder
sublimecoder / tmux-cheatsheet.markdown
Last active August 29, 2015 14:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
toppings = %w(pepperoni mushroom bacon pineapple)
def pizza(toppings)
toppings.map do |topping|
puts "I love #{topping} pizza!"
end
end
def pizza(toppings)
toppings.map do |topping|
"I love #{topping} pizza!"
end
end
alias todo='$EDITOR ~/.todo'
alias gclean="git branch | grep -v "master" | xargs git branch -D"
# Handle the fact that this file will be used with multiple OSs
platform=`uname`
if [[ $platform == 'Linux' ]]; then
alias a='ls -lrth --color'
elif [[ $platform == 'Darwin' ]]; then
alias a='ls -lrthG'
fi
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
SELECT
zipcode
(
3959 * acos(
cos(radians($LattitudeVar)) * cos(radians(latitude)) * cos(
radians(longitude) - radians($longitudeVar)
) + sin(radians($LattitudeVar)) * sin(radians(latitude))
)
) AS distance
FROM