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
Started GET "/oauth/authorize?response_type=code&client_id=197ed256c231df835220264639dc4122a1f08a5806ac49d8558bca5a4559908f&redirect_uri=http%3A%2F%2Fdoorkeeper-client.dev%2Fusers%2Fauth%2Fdoorkeeper%2Fcallback" for 127.0.0.1 at 2012-02-27 15:18:29 -0800 | |
Processing by Doorkeeper::AuthorizationsController#new as HTML | |
Parameters: {"response_type"=>"code", "client_id"=>"197ed256c231df835220264639dc4122a1f08a5806ac49d8558bca5a4559908f", "redirect_uri"=>"http://doorkeeper-client.dev/users/auth/doorkeeper/callback"} | |
Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = 1 LIMIT 1 | |
Doorkeeper::Application Load (0.2ms) SELECT "oauth_applications".* FROM "oauth_applications" WHERE "oauth_applications"."uid" = '197ed256c231df835220264639dc4122a1f08a5806ac49d8558bca5a4559908f' LIMIT 1 | |
Rendered doorkeeper/authorizations/error.html.erb within layouts/application (9.5ms) | |
Completed 200 OK in 140ms (Views: 70.0ms | ActiveRecord: 0.6ms) |
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
attempt_count = 0 | |
begin | |
response = Twitter.user_timeline('davidfrey', {:count=>200, :include_rts => true, :include_entitites => true}) | |
rescue Twitter::Error => error | |
attempts_count += 1 | |
code = error.class.to_s.gsub('Twitter::Error::','') | |
case code.downcase | |
when /notfound|unauthorized/ | |
#void collection |
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
# Setting up Ruby development environment for a new Mac | |
Install Xcode from the App store. | |
Install Command Line Tools from XCode | |
Install Homebrew | |
Run `brew doctor` at each stage of an install | |
You may have to reorder the path priority in /etc/paths | |
Install Git | |
`brew install git` | |
Configure Git | |
`config --global user.name "Your Name"` |
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
# /lib/fix_me.rb | |
module FixMe | |
def self.status | |
'broken' | |
end | |
end | |
# /config/environments/development.rb | |
module FixMe | |
def self.status |
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
Id User Host db Command Time State Info | |
1 root localhost:58150 NULL Query 1131598 NULL show processlist | |
2 root localhost:58151 NULL Sleep 7 NULL | |
1452 root localhost NULL Query 1 User sleep select sleep(3) | |
1453 root localhost NULL Query 1 User sleep select sleep(3) | |
1454 root localhost NULL Query 1 User sleep select sleep(3) | |
1455 root localhost NULL Query 1 User sleep select sleep(3) | |
1456 root localhost NULL Query 1 User sleep select sleep(3) | |
1457 root localhost NULL Query 1 User sleep select sleep(3) | |
1458 root localhost NULL Query 1 User sleep select sleep(3) |
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
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi | |
if [ -f ~/.git-prompt.sh ]; then | |
source ~/.git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE=true | |
fi |
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
require 'yajl' | |
def get_memory_usage | |
`ps -o rss= -p #{Process.pid}`.to_i / 1024 | |
end | |
before = get_memory_usage | |
parsed_lines = [] | |
File.open("public/sample.json", 'r') do |f| | |
f.each_line do |line| |
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
# Make shelling out in Vim pick up RVM settings | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
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
# Faces of Dave Customization | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxCxegedabagacGx | |
alias ls="gls -lh --color -h --group-directories-first" | |
alias externalip="dig +short myip.opendns.com @resolver1.opendns.com" | |
alias please=sudo | |
PROMPT="$emoji[rocket] $PROMPT" |
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
[alias] | |
last-tag = !sh -c 'git describe --tags `git rev-list --tags --max-count=1`' | |
stable = !sh -c 'git describe --tags `git rev-list --tags=releases/ --max-count=1`' |
OlderNewer