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 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" |
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
# Usage: | |
# >> User.random | |
# => #<User login: ... | |
class ActiveRecord::Base | |
def self.random | |
find(rand(count)) | |
rescue ActiveRecord::RecordNotFound | |
retry |