Skip to content

Instantly share code, notes, and snippets.

View kpumuk's full-sized avatar

Dmytro Shteflyuk kpumuk

View GitHub Profile
@kpumuk
kpumuk / gist:54615
Created January 29, 2009 16:43 — forked from mdarby/gist:54614
alias ga="git add"
alias gb="git branch"
alias gc="git checkout"
alias gd="git diff"
alias gci="git commit"
alias gg='git log --graph --pretty=format:"%Cred%h%Creset — %s %Cgreen(%cr)%Creset" --abbrev-commit --date=relative'
alias gl="git pull"
alias gm="git merge"
alias gp="git push"
alias gs="git status"
@kpumuk
kpumuk / gist:54141
Created January 28, 2009 19:28 — forked from mdarby/gist:43082
# Usage:
# >> User.random
# => #<User login: ...
class ActiveRecord::Base
def self.random
find(rand(count))
rescue ActiveRecord::RecordNotFound
retry