1
0
Fork 0
mirror of https://github.com/sbrl/bin.git synced 2018-01-10 21:33:46 +00:00

Added gitignore.io

This commit is contained in:
Starbeamrainbowlabs 2016-05-16 21:01:51 +01:00
parent f4cb8aef88
commit 3e290ad7a8

View file

@ -53,6 +53,9 @@ alias termbin='netcat termbin.com 9999'
transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
# gitignore.io interface
function gitignore() { curl -L -s https://www.gitignore.io/api/\$@ ;}
# Get / Set clipboard contents # Get / Set clipboard contents
alias setclip='xclip -selection c' alias setclip='xclip -selection c'
alias getclip='xclip -selection clipboard -o' alias getclip='xclip -selection clipboard -o'