Skip to content

Instantly share code, notes, and snippets.

Andrew Katz andrewkatz

Block or report user

Report or block andrewkatz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:093cbd8f19161abb68e5
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 / spacegray_slack_theme
Last active Aug 29, 2015
Spacegray Slack Theme
View spacegray_slack_theme
#2B303B,#2B303B,#8FA1B3,#2B303B,#343D46,#C0C5CE,#A3BE8C,#BF616A
View andrewkatz.zsh-theme
PROMPT=$'%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info) '
RPROMPT='(%{$fg[blue]%}ruby:%{$reset_color%}$(rbenv_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=""
View .slate
# 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
View gist:7148984
/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
View gist:6075245
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'
@andrewkatz
andrewkatz / .zshrc
Created May 6, 2013
Simple command for ssh'ing into rails hosts. Thanks to @trobrock for the ruby script.
View .zshrc
# 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
}
View Tomorrow-Night.vim
" 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"
View gist:4552578
[~/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
View andrewkatz.zsh-theme
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=""
You can’t perform that action at this time.