Skip to content

Instantly share code, notes, and snippets.

View suderman's full-sized avatar

Jon Suderman suderman

View GitHub Profile
@suderman
suderman / statusline.vim
Created September 26, 2011 22:50
Scrooloose Statusline
"statusline setup
set statusline=%f "tail of the filename
"display a warning if fileformat isnt unix
set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
set statusline+=%*
"display a warning if file encoding isnt utf-8
set statusline+=%#warningmsg#
Source https://github.com/Lokaltog/vim-powerline
let g:Powerline_symbols = 'fancy'
@suderman
suderman / .tmux.conf
Created March 10, 2012 00:14
Tmux Goodness
# Report that we can handle 256 colors
set -g default-terminal "screen-256color"
# act like GNU screen
unbind C-b
set -g prefix C-a
# OhMyZsh ftw!
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
@suderman
suderman / userstyle.css
Created May 29, 2012 21:39
Campfire CSS
#Tabs { min-width: 520px !important; }
.Left, .speak { width: 100% !important; }
#input { width: 440px !important; }
#Wrapper { padding-left: 0 !important; padding-right: 0 !important; }
.Left .col, .Full .col { padding: 5px 0 0 !important; background: #fff !important; }
#todays_transcript { padding: 5px !important; }
#Sidebar { right: 0 !important; }
#SidebarTop, #search_form, #guest_access, #files, #room_locking { display: none !important; }
@suderman
suderman / mysql.sh
Created July 11, 2012 19:49
After brew install mysql
#!/bin/sh
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start
mkdir -p ~/Library/LaunchAgents
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
cp "$(brew --prefix mysql)/homebrew.mxcl.mysql.plist" ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
@suderman
suderman / test.sh
Created July 28, 2012 05:48
test.sh
#!/bin/sh
# Check for symlink and create symbolic links
command -v symlink >/dev/null 2>&1 || { curl https://raw.github.com/suderman/symlink/master/install.sh | sh; }
cd ~/.dotfiles && symlink symlinks.yml
# Now that SSH is all set up, update remote origins for password-less pushing
if [ -f ~/.ssh/id_rsa ]; then
echo "has ssh"
@suderman
suderman / install-python-cheetah.sh
Created August 1, 2012 21:15
Install Python Cheetah
#!/bin/sh
cd /tmp
curl http://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz -o cheetah.tar.gz
tar -zxvf cheetah.tar.gz
cd Cheetah-2.4.4
sudo python setup.py install
@suderman
suderman / gist:4155637
Created November 27, 2012 17:19
Premium Seating local
# -- Add to top of config/environment.rb --
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.3.7')
module Rails
class GemDependency
def requirement
r = super
(r == Gem::Requirement.default) ? nil : r
end
end
end
@suderman
suderman / git-scripts.sh
Created April 5, 2013 05:38
Remove files from git history
# FIND BIG FILES:
git rev-list --all --objects | \
sed -n $(git rev-list --objects --all | \
cut -f1 -d' ' | \
git cat-file --batch-check | \
grep blob | \
sort -n -k 3 | \
tail -n100 | \
while read hash type size; do
# Login to shopify console and copy-paste the following script:
order_count = ShopifyAPI::Order.count
nb_pages = (order_count / 250.0).ceil
# Looking for orders with only these products
PRODUCT_IDS = [144760487, 144107049]
# 10 minutes times 60 seconds per minute.
CYCLE = 5 * 60