lkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflksadjlkajsdflkjaslkfjsdlkajflks adjlkajsdflkjaslkfjsdlkajflksadjf
Last active
August 29, 2015 14:04
-
-
Save spicycode/bd77756744629e46b132 to your computer and use it in GitHub Desktop.
My crazy 🎆 description 💥
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
# Detect empty enter, execute git status if in git dir | |
magic-enter () { | |
if [[ -z $BUFFER ]]; then | |
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then | |
echo -ne '\n' | |
git status -sb | |
fi | |
zle accept-line | |
else | |
zle accept-line | |
fi | |
} | |
zle -N magic-enter | |
bindkey "^M" magic-enter |
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
# Before | |
User.all(:select => :id, :conditions => {:login => Array(users), :spammy => false}).each do |user| | |
ids.concat user.public_gist_ids | |
end | |
# After | |
User.where(:login => Array(users), :spammy => false).select(:id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment