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 |
anthony / Set custom display resolution using xrandr
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | #!/bin/bash |
2 | ######################################################################### |
3 | # # |
4 | # Set display resolution # |
5 | # # |
6 | # Author: Anthony Axenov (Антон Аксенов) # |
7 | # Version: 1.0 # |
8 | # License: WTFPL # |
9 | # # |
10 | ######################################################################### |
anthony / Get latest release from GitHub
0 mi piace
0 forks
1 files
Ultima volta attivo
1 | #!/bin/bash |
2 | get_latest_release() { |
3 | curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api |
4 | grep '"tag_name":' | # Get tag line |
5 | sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value |
6 | } |
anthony / Argument parser for bash scripts without getopt or getopts
0 mi piace
0 forks
1 files
Ultima volta attivo
Taken from b167d3ec4e4f94d246ebdc4bcfdfb6ac
1 | #!/usr/bin/env bash |
2 | |
3 | # Argument parser for bash scripts |
4 | # |
5 | # Author: Anthony Axenov (Антон Аксенов) |
6 | # Version: 1.6 |
7 | # License: MIT |
8 | # Description: https://git.axenov.dev/anthony/shell/src/branch/master/helpers/arg-parser |
9 | |
10 | #purpose Little helper to check if string matches PCRE |
Più nuovi
Più vecchi