mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2020-11-18 19:53:40 -08:00
several small improvements
This commit is contained in:
parent
bbc5bcc7e9
commit
bb4c95919f
25
README.md
25
README.md
@ -36,10 +36,29 @@ $ transfer test.txt
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
- grunt serve
|
```
|
||||||
- grunt build
|
npm install
|
||||||
|
bower install
|
||||||
|
|
||||||
- sh transfer-server/run.sh
|
go get github.com/PuerkitoBio/ghost/handlers
|
||||||
|
go get github.com/gorilla/mux
|
||||||
|
go get github.com/dutchcoders/go-clamd
|
||||||
|
go get github.com/goamz/goamz/s3
|
||||||
|
go get github.com/goamz/goamz/aws
|
||||||
|
go get github.com/golang/gddo/httputil/header
|
||||||
|
go get github.com/kennygrant/sanitize
|
||||||
|
|
||||||
|
grunt serve
|
||||||
|
grunt build
|
||||||
|
|
||||||
|
sh transfer-server/run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```
|
||||||
|
go build *.go -o transfersh-server
|
||||||
|
```
|
||||||
|
|
||||||
## Contributions
|
## Contributions
|
||||||
|
|
||||||
|
@ -137,7 +137,14 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Make an alias</h3>
|
<h3>Make an alias</h3>
|
||||||
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
||||||
<code>transfer() { curl --upload-file $1 https://transfer.sh/$(basename $1); }<br>
|
<code>transfer() {
|
||||||
|
# write to output to tmpfile because of progress bar
|
||||||
|
tmpfile=$( mktemp -t transfer )
|
||||||
|
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
|
||||||
|
cat $tmpfile;
|
||||||
|
rm -f $tmpfile;
|
||||||
|
}
|
||||||
|
|
||||||
alias transfer=transfer</code>
|
alias transfer=transfer</code>
|
||||||
<h4>Now you can just use <strong>transfer</strong> command</h4>
|
<h4>Now you can just use <strong>transfer</strong> command</h4>
|
||||||
<code>transfer hello.txt</code>
|
<code>transfer hello.txt</code>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -139,7 +139,14 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Make an alias</h3>
|
<h3>Make an alias</h3>
|
||||||
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
||||||
<code>transfer() { curl --upload-file $1 https://transfer.sh/$(basename $1); }<br>
|
<code>transfer() {
|
||||||
|
# write to output to tmpfile because of progress bar
|
||||||
|
tmpfile=$( mktemp -t transfer )
|
||||||
|
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
|
||||||
|
cat $tmpfile;
|
||||||
|
rm -f $tmpfile;
|
||||||
|
}
|
||||||
|
|
||||||
alias transfer=transfer</code>
|
alias transfer=transfer</code>
|
||||||
<h4>Now you can just use <strong>transfer</strong> command</h4>
|
<h4>Now you can just use <strong>transfer</strong> command</h4>
|
||||||
<code>transfer hello.txt</code>
|
<code>transfer hello.txt</code>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user