@@ -171,7 +171,7 @@ | |||||
<div class="terminal"> | <div class="terminal"> | ||||
<code> | <code> | ||||
<span class="code-title"># Add this to .bashrc or its equivalent</span> | <span class="code-title"># Add this to .bashrc or its equivalent</span> | ||||
<br/>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 <br/>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; }; alias transfer=transfer | |||||
<br/>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 <br/>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; } | |||||
<br/> | <br/> | ||||
<br/> | <br/> | ||||
<span class="code-title"># Now you can use transfer command</span> | <span class="code-title"># Now you can use transfer command</span> | ||||
@@ -418,7 +418,7 @@ | |||||
<section id="tor"> | <section id="tor"> | ||||
<div class="wrapper"> | <div class="wrapper"> | ||||
<a href="https://torproject.com"><img src="images/tor.svg" alt=""></a><br/> | |||||
<a href="https://www.torproject.org"><img src="images/tor.svg" alt=""></a><br/> | |||||
<a href="http://jxm5d6emw5rknovg.onion/">http://jxm5d6emw5rknovg.onion/</a> | <a href="http://jxm5d6emw5rknovg.onion/">http://jxm5d6emw5rknovg.onion/</a> | ||||
</div> | </div> | ||||
</section> | </section> | ||||
@@ -34,9 +34,7 @@ Add alias to .bashrc or .zshrc: | |||||
=== | === | ||||
transfer() { | 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 | 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"; fi; cat $tmpfile; rm -f $tmpfile; }; alias transfer=transfer | |||||
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"; fi; cat $tmpfile; rm -f $tmpfile; } | |||||
} | } | ||||
alias transfer=transfer | |||||
=== | === | ||||
$ transfer test.txt | $ transfer test.txt |
@@ -145,7 +145,7 @@ include "includes/head.html" | |||||
<div class="terminal"> | <div class="terminal"> | ||||
<code> | <code> | ||||
<span class="code-title"># Add this to .bashrc or its equivalent</span> | <span class="code-title"># Add this to .bashrc or its equivalent</span> | ||||
<br/>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 <br/>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; }; alias transfer=transfer | |||||
<br/>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 <br/>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; } | |||||
<br/> | <br/> | ||||
<br/> | <br/> | ||||
<span class="code-title"># Now you can use transfer command</span> | <span class="code-title"># Now you can use transfer command</span> | ||||
@@ -34,9 +34,7 @@ Add alias to .bashrc or .zshrc: | |||||
=== | === | ||||
transfer() { | 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 | 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"; fi; cat $tmpfile; rm -f $tmpfile; }; alias transfer=transfer | |||||
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"; fi; cat $tmpfile; rm -f $tmpfile; } | |||||
} | } | ||||
alias transfer=transfer | |||||
=== | === | ||||
$ transfer test.txt | $ transfer test.txt |