add scripts
Signed-off-by: Martin Matous <m@matous.dev>
This commit is contained in:
parent
c6c66648ea
commit
5a4419bb4e
12 changed files with 802 additions and 1 deletions
131
README.md
131
README.md
|
|
@ -1,2 +1,131 @@
|
|||
# scripts
|
||||
# Various useful-ish scripts
|
||||
Scripts I wrote at some point or another. Inconsistent quality, no guarantees.
|
||||
|
||||
It's likely some never worked or that I got bored writing halfway.
|
||||
|
||||
## availability-monitor.py
|
||||
Low-budget homemade handmade monitoring for homeserver.
|
||||
|
||||
Status: active use
|
||||
|
||||
Dependencies: python, dnspython, Matrix account
|
||||
|
||||
Usage: Run as a daemon, `/usr/local/bin/availability-monitor.py <interval-sec>`
|
||||
|
||||
## dnf-search-install.py
|
||||
Wrapper, marks already installed packages for `dnf search`. Slow.
|
||||
|
||||
Status: active use
|
||||
|
||||
Dependencies: dnf, python
|
||||
|
||||
Setup:
|
||||
```bash
|
||||
sudo cp ./dnf-search-installed.py /usr/local/bin/.
|
||||
alias -s dnf '/usr/local/bin/dnf-search-installed.py'
|
||||
```
|
||||
Usage: `dnf search <package>`
|
||||
|
||||
|
||||
## gasquery.py
|
||||
Query Alchemy API for current ETH L1 basefee.
|
||||
Intended for consumption by i3status-rs' custom block.
|
||||
|
||||
Status: active use
|
||||
|
||||
Dependencies: Alchemy API key
|
||||
|
||||
Usage: `gasquery.py <alchemy-api-key> <notification-threshold>`
|
||||
|
||||
|
||||
## gentoo-chroot.sh
|
||||
Automate chrooting from live USB to fix installed system.
|
||||
|
||||
Status: active use :(
|
||||
|
||||
Dependencies: Nothing unusual
|
||||
|
||||
Usage: `chroot.sh`
|
||||
|
||||
|
||||
## gtokei.sh
|
||||
Wrapper, count lines of code for git repos with [tokei](https://github.com/XAMPPRocky/tokei).
|
||||
|
||||
Status: active use
|
||||
|
||||
Dependencies: tokei, git
|
||||
|
||||
Usage: `gtokei.sh https://github.com/some/repo`
|
||||
|
||||
|
||||
## kernel-update.py
|
||||
Automate chores when configuring, compiling and updating kernel.
|
||||
|
||||
Install step can be simplified by using properly setup installkernel/kernel-install
|
||||
invocation by `make install`.
|
||||
|
||||
Status: active use
|
||||
|
||||
Dependencies: python-magic, Gentoo (not really but genkernel, eselect, specific names and paths...)
|
||||
|
||||
Usage: `kernel-update.py <old-version> <new-version>`
|
||||
|
||||
|
||||
---
|
||||
|
||||
## flac-convert.py
|
||||
Convert all .m4a into max-compressed .flac
|
||||
|
||||
Status: ancient one-off, likely low quality
|
||||
|
||||
Dependencies: ffmpeg
|
||||
|
||||
Usage: `flac-convert.py /path/to/music`
|
||||
|
||||
|
||||
## from-ca-to-server.sh
|
||||
Create own CA and use it to sign a certificate
|
||||
|
||||
Status: ancient one-off, unknown purpose
|
||||
|
||||
Dependencies: openssl
|
||||
|
||||
Usage: ???
|
||||
|
||||
|
||||
## jxl-restore.py
|
||||
Check whether JPEG version of .jxl exists, remove .jxl if does.
|
||||
Attempt at rescuing collection where conversion got messed up.
|
||||
|
||||
Will fix one day. Maybe.
|
||||
|
||||
Status: ancient one-off, broken
|
||||
|
||||
Dependencies: None
|
||||
|
||||
Usage: None
|
||||
|
||||
|
||||
## invoke-magic.bat
|
||||
Add watermark to photo and create thumbnail.
|
||||
Contains detailed parameter explanation. Created for friend's blog.
|
||||
|
||||
Status: ancient but probably still working
|
||||
|
||||
Dependencies: imagemagick
|
||||
|
||||
Usage: Run next to `logo.png` and `workdir` directory with photos
|
||||
|
||||
|
||||
## sync-apparmor.py
|
||||
Scan source directory of profiles and binaries in the system.
|
||||
Copy profiles that would have a use
|
||||
Useful for initial profile dir setup and mopping up old profiles.
|
||||
|
||||
Doesn't work for subprofiles
|
||||
|
||||
Status: one-off
|
||||
|
||||
Dependencies: apparmor
|
||||
|
||||
Usage: `sync-apparmor.py <src> <dst>`
|
||||
Loading…
Add table
Add a link
Reference in a new issue