Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Nick Waelkens nickwaelkens

🎯
Focusing
View GitHub Profile
@nickwaelkens
nickwaelkens / upload2ftp.sh
Created Feb 12, 2014
Upload to FTP (useful for in Automator)
View upload2ftp.sh
while read f
do
x="$f"
x=${x// /%20}
x=${x##*/}
curl -u username:password ftp.host.com -T "$f" && echo host.com/"$x" | pbcopy
done
@nickwaelkens
nickwaelkens / rot13.coffee
Last active Dec 16, 2015
ROT13 in CoffeeScript
View rot13.coffee
# "stop, hammertime".rot13() // returns "fgbc, unzzregvzr"
# "fgbc, unzzregvzr".rot13() // returns "stop, hammertime"
String::rot13 = ->
this.replace /[a-zA-Z]/g, (c) ->
String.fromCharCode (if ((if c <= "Z" then 90 else 122)) >= (c = c.charCodeAt(0) + 13) then c else c - 26)