mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-22 04:19:47 -05:00
docs(readme): reorder sections in README.md
This commit is contained in:
parent
2d5c14a6e0
commit
51d6fdd0d8
1 changed files with 11 additions and 11 deletions
22
README.md
22
README.md
|
@ -99,17 +99,6 @@ $ curl -F "file=@x.txt" -H "expire:10min" "<server_address>"
|
||||||
$ curl -F "oneshot=@x.txt" "<server_address>"
|
$ curl -F "oneshot=@x.txt" "<server_address>"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Cleaning up expired files
|
|
||||||
|
|
||||||
```sh
|
|
||||||
#!/bin/env sh
|
|
||||||
now=$(date +%s)
|
|
||||||
find upload/ -maxdepth 2 -type f -iname "*.[0-9]*" |
|
|
||||||
while read -r filename; do
|
|
||||||
[ "$(( ${filename##*.} / 1000 - "${now}" ))" -lt 0 ] && rm -v "${filename}"
|
|
||||||
done
|
|
||||||
```
|
|
||||||
|
|
||||||
#### URL shortening
|
#### URL shortening
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
@ -122,6 +111,17 @@ $ curl -F "url=https://example.com/some/long/url" "<server_address>"
|
||||||
$ curl -F "remote=https://example.com/file.png" "<server_address>"
|
$ curl -F "remote=https://example.com/file.png" "<server_address>"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Cleaning up expired files
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/bin/env sh
|
||||||
|
now=$(date +%s)
|
||||||
|
find upload/ -maxdepth 2 -type f -iname "*.[0-9]*" |
|
||||||
|
while read -r filename; do
|
||||||
|
[ "$(( ${filename##*.} / 1000 - "${now}" ))" -lt 0 ] && rm -v "${filename}"
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
|
|
||||||
To start the server:
|
To start the server:
|
||||||
|
|
Loading…
Reference in a new issue