Skip to content

Instantly share code, notes, and snippets.

View andrewkatz's full-sized avatar

Andrew Katz andrewkatz

  • Los Angeles, CA
View GitHub Profile
@andrewkatz
andrewkatz / .slate
Created March 5, 2014 20:41
Slate config
# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config keyboardLayout qwerty
config windowHintsBackgroundColor 0;0;0;0.8
config windowHintsShowIcons true
@andrewkatz
andrewkatz / spacegray_slack_theme
Last active August 29, 2015 14:08
Spacegray Slack Theme
#2B303B,#2B303B,#8FA1B3,#2B303B,#343D46,#C0C5CE,#A3BE8C,#BF616A
alias gphu='gph -u origin'
gpqt()
{
last_commit=$(git log -1 --pretty=%B)
message=${1:-$last_commit}
echo "$message\n@trobrock" | gpq -F -
}
xpq()
@andrewkatz
andrewkatz / .tmux.conf
Created January 13, 2013 22:33
tmux config
set -g default-terminal "screen-256color"
# Use the system pasteboard
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Bind Control key to match Screen
set -g prefix C-a
# Use vi key bindings
set -g status-keys vi
PROMPT=$'%{$fg[blue]%}[%~]%{$reset_color%}$(git_prompt_info) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%} ["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
@andrewkatz
andrewkatz / gist:4552578
Created January 17, 2013 00:59
jasmine segfault
[~/dev/outright] [rails-3.0-upgrade ✗] rake jasmine:ci
Unable to load thrift_native extension. Defaulting to pure Ruby libraries.
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.txn" is no longer supported
/Users/andrewkatz/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby -S rspec /Users/andrewkatz/.rvm/gems/ree-1.8.7-2012.02@outright/gems/jasmine-1.3.1/lib/jasmine/run_specs.rb --colour --format progress -r /Users/andrewkatz/dev/outright/config/environment
Unable to load thrift_native extension. Defaulting to pure Ruby libraries.
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.txn" is no longer supported
Waiting for jasmine server on 58225...
[2013-01-16 16:58:23] INFO WEBrick 1.3.1
" Tomorrow Night - Full Colour and 256 Colour
" http://chriskempson.com
"
" Hex colour conversion functions borrowed from the theme "Desert256""
" Default GUI Colours
let s:foreground = "c5c8c6"
let s:background = "1a1a1a"
let s:selection = "373b41"
let s:line = "282a2e"
@andrewkatz
andrewkatz / .zshrc
Created May 6, 2013 17:22
Simple command for ssh'ing into rails hosts. Thanks to @trobrock for the ruby script.
# Usage:
# rails_ssh release cron
# => ssh release@ec2-xx-xx-xx-xx.compute-1.amazonaws.com
rails_ssh()
{
username=$1
hostname="$(ruby $HOME/Scripts/parse_cap_config.rb $2)"
ssh $username@$hostname
}
irb(main):007:0> fog.directories
Excon::Errors::SocketError: no such service 443/tcp (SocketError)
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/socket.rb:149:in `connect'
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/ssl_socket.rb:103:in `connect'
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/socket.rb:32:in `initialize'
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/ssl_socket.rb:8:in `initialize'
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/connection.rb:361:in `new'
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/connection.rb:361:in `socket'
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/connection.rb:105:in `request_call'
from /Users/andrewkatz/dev/aggregation/vendor/gems/excon-0.25.3/lib/excon/middlewares/mock.rb:42:in `request_call'
/usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:258:in `dup': can't dup TrueClass (TypeError)
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:258:in `normalize'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:229:in `[]='
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:151:in `mount'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/jekyll-1.2.1/lib/jekyll/commands/serve.rb:19:in `process'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/jekyll-1.2.1/bin/jekyll:100:in `block (2 levels) in <top (required)>'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /usr/local/op