Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wcaleb committed Sep 6, 2012
1 parent fc56a64 commit 35149e8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions se-aliases.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# http://ruslanspivak.com/2010/06/02/urlencode-and-urldecode-from-a-command-line/

alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'

function scholar()
{
QUERY=$(urlencode "$1")
open "http://scholar.google.com/scholar?hl=en&q=`echo $QUERY`"
}

0 comments on commit 35149e8

Please sign in to comment.