- Shell 43.9%
- Python 23.7%
- Rust 13.3%
- Svelte 8.5%
- TypeScript 7.1%
- Other 3.4%
| android | ||
| apps/dance-windows | ||
| backup_ignore | ||
| config | ||
| docker | ||
| docs | ||
| linux | ||
| mk | ||
| nginx/matrix-registration | ||
| nodejs/slideshow_html | ||
| python | ||
| rust | ||
| svelte | ||
| systemd | ||
| termux | ||
| .flake8 | ||
| .gitignore | ||
| install | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Utils
Miscellaneous Linux utility scripts loosely grouped by folder. Hopefully helpful to someone, but use at your own risk.
Caveats
- These are tested by me for me, so inspect before running.
- I mostly use Ubuntu/Debian desktop, but I also frequently use these on Redhat servers, headless Ubuntu server, Arch Linux, and the Android shell environment Termux.
Installation
Run this command with your preferred directory structure:
./install -b /path/to/bin -c /path/to/config -l /path/to/logs -t /path/to/tmp -p /path/to/python_env
By default I use the following directory structure:
# this dir goes in your $PATH and is where scripts are installed
bin_default='$HOME/bin'
# directory for configs that aren’t in $HOME
config_default='$HOME/.config'
# local directory for logs
logs_default='$HOME/logs'
# local tmp directory for systems where /tmp is troublesome or non-existent
tmp_default='$HOME/tmp'
# I keep a python virtual environment here and use this for any global `pip install package_name` operations
pyenv_bin_default='$HOME/.pyenv/devel/bin'
Conventions
$HOME/bin: executable utilities that I’ve written and curated, almost all from the https://https://git.inzcloud.net/rjdang/utils repo, categorized by directory$HOME/.sh: number and categorized rc files, sets up the shell environment in order, sourced from$HOME/.zshrc$HOME/.config/private/devices.json: a list of devices and their properties, assigns roles to devices, used to generate the ssh config file$HOME/.config/private/api.json: defines api things like github access token$HOME/.config/private/password.json: a place to put plain text passwords, meant for things like app specific passwords that aren’t serious enough to actually be encrypted (beyond normal home dir and disc encryption)$HOME/.config/private/iot.json: like devices.json but for iot things like ip address of each wifi enabled light bulb$HOME/.config/private/browser_profiles.json: configuration of different firefox/librewolf profiles
Rust
This repo provides a rust cross compilation flow. See make help. Each rust target is a directory in ./rust. Each target is a separate rust package. The top level Makefile can orchestrate cross compilation and native builds within each package.
Docker
This repo provides a docker build flow with some nice caching properties via the Makefile. You must follow these conventions:
.
├── Dockerfile # the dockerfile
├── inside # files copied and/or referenced inside the container
│ ├── ...
│ └── start # example file in container
├── outside # files referenced and run outside the container
│ ├── packages.txt
│ ├── monitor # optional script to monitor the container status
│ ├── clean # optional script to clean beyond normal image/container cleanup
│ └── run # required run command to start the container
└── README.md # describe the container
See make help for the docker specific targets. Each directory in ./docker/<target> is a target namespace.