anthony / ltrim(), rtrim(), and trim() in awk
0 mi piace
0 forks
1 files
Ultima volta attivo
| 1 | function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s } |
| 2 | function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s } |
| 3 | function trim(s) { return rtrim(ltrim(s)); } |
| 4 | BEGIN { |
| 5 | # whatever |
| 6 | } |
| 7 | { |
| 8 | # whatever |
| 9 | } |
| 10 | END { |
anthony / Backup your project to another server (scp)
0 mi piace
0 forks
1 files
Ultima volta attivo
| 1 | #!/bin/bash |
| 2 | ##################################################################### |
| 3 | # # |
| 4 | # Stupidly simple backup script for own projects # |
| 5 | # # |
| 6 | # Author: Anthony Axenov (Антон Аксенов) # |
| 7 | # Version: 1.0 # |
| 8 | # License: WTFPLv2 More info: https://axenov.dev/?p=1423 # |
| 9 | # # |
| 10 | ##################################################################### |
anthony / Backup files synced from Syncthing
0 mi piace
0 forks
2 files
Ultima volta attivo
| 1 | # Daemon file |
| 2 | # Place or symlink it to /etc/systemd/system/inotifywait-cp.service |
| 3 | # Enable and start: sudo systemctl enable --now inotifywait-cp |
| 4 | # Check it: sudo systemctl status inotifywait-cp |
| 5 | |
| 6 | [Unit] |
| 7 | Description=Photosync from android |
| 8 | |
| 9 | [Service] |
| 10 | Type=simple |
Più nuovi
Più vecchi