This file contains hidden or 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
function transfer | |
if test (count $argv) -eq 0 | |
echo -e "No arguments specified.\nUsage:\n\techo transfer /tmp/test.md\n\tcat /tmp/test.md | transfer test.md" | |
return 1 | |
end | |
## get temporarily filename, output is written to this file show progress can be showed | |
set tmpfile ( mktemp -t transferXXX ) | |
## upload stdin or file |
This file contains hidden or 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
txt=$(cat $1 | tail -1000) | |
key=$(curl -d post_data="$txt" "http://hastebin.com/documents" | sed 's/{\|}\|\"\|:\|\(key\)//g') | |
raw_url="http://hastebin.com/raw/${key}" | |
txt_url="http://hastebin.com/${key}.txt" | |
echo $txt_url |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |