A collection of simple programs/scripts which I found useful at some point but which do not deserve a repository on their own.
Minimal number of dependencies:
- favor builtin dependencies;
- eg.
argparseinstead ofclick; - try to use dependencies which are already packaged in your standard Linux distro;
- try to keep compatibility with different versions of the libraries.
Interface:
- the CLI interface may not be completely stable;
- some programs may have very limited CLI handling.
Simplicity:
- try to keep the code simple, easy to modify and repurpose for other purpose.
admin/:
gnt-instance-vnc-connect.py, open a RDP connection to a Ganeti instance from a Ganeti node
content/:
joomla_to_wordpress_redirect.rb, generate redirections for a Joomla to WordPress migration.
content/:
cleanup_html.rb, cleanup HTML snippet
data/:
accesslog2jsonl.py, parseaccess.log(HTTP server) logs into JSON line entriescbor2json.pyconvert CBOR to JSONdecode-hc1-covid-certificate, decode a HC1 COVID certificatefods2html.xsl, XSLT stylesheet to convert OpenDocument plain XML spreadsheets (.fods) into HTMLgrexpath.rb, like grep buth with XPATH expressionjson2cbor.py, convert JSON to CBORjson2msgpack.py, convert JSON to MessagePackjson2yaml.py, convert JSON to YAMLltsv2jsonl.py, convert LTSV (labelLabeled Tab-separated Values) to JSON linesmsgpack2json.py, convert MessagePack to JSONre2jsonl.py, convert lines int JSON based on one or more regular expressionssplitasciiarmor.py, split ASCII Armor (or PEM) files into multiple filestsv2html.sed, convert TSV to HTML<table>yaml2json.py, convert YAML to JSONzlibcat.py, decompress raw zlib (likezcatand friends)
desktop/:
global-stopwatch.py, desktop stopwatch based on global keybindings.gui_filter.sh, filter the content of the clipboard/selection through a UNIX commandkeybinder.py, execute a program when a global keyboard shortcut is triggeredocrjpn.sh, OCR a selection of the screen in order to extract Japanese characterstake-screenshot.sh, take a screenhotwhich-theme.sh, which themes are available in both GTK2 and GTK3?xrandr-helper.sh, helper for xrandrxsettings-query.py, dump XSETTINGSzbarflash.sh, parse QR code from a selection of the screen
desktop/sound/:
pulse-mute-toggle.py, toggle PulseAudio default source mute with desktop notificationpulse-toggle-output.py, toggle default PulseAudio outputpushtotalk.py, push-to-talk using PulseAudio
dev/:
compile_commands/gen_compile_commands.rb, generat acompile_commands.jsonfrom a set of rules (for helping tooling integration);
dev/profiling/:
aggregate-counts.pymegalopoll.py, polling command, simple building block for Poor man's profilingpmp.sh, Poor-man's profiler implementationstackcollapse-jstack.py, collapse Java stacks fromjstackandjcmdfor FlameGraphsymbolicate-elfutils.py, add symbols from /tmp/perf-$pid.map into output of elfutils stack
For SQL:
pmp-mysql.sh, Poor-man's profiler for MySQL and MariaDB requestsnormalize-sql.py, normalize SQL requests (useful for aggregation)
device/:
feel-my-power.py, display notification about battery status of devices (eg. for wireless gamepad) using upower
disk/:
mount-diskimage.py, mount an image (ISO) using udisks2xdg-open-diskimage.sh
misc/:
sleep-exponential.py, likesleepwith following an exponential distribution
network/:
ipls.py, list IP addresses in a subnetrmcp-discover.py, discover RMCP nodes (such as AMT or IPMI) on the LANssdp-listen.py, listen for SSDP announces and dump responsesssdp-search.py, launch a SSDP search request and dump responsesupnp-display-interfaces.py, display human friendly description of some UPnP service
security/:
memexec.py, execute a program from a pipe, etc. without writing the file to any filesystem.
ssh/:
list-ssh-hosts.py, lists known SSH hostsssh-menu.sh, TUI menu for opening a shell on a chosen SSH host
system/:
fdpass/fdpass.py, pass a file descriptor over STDOUTfdpass/fdrcv-test.py, receive a file descriptor fromfdpass.pyseccompstuff/nonetwork.c, disable networking system calls using seccomp-bpfprocdump.py, dump a process memory without stopping itsocket-activate.py, systemd-style (LISTEN_FDS) socket activation (like systemd-socket-activate)socket-listen-inetd.py, LISTEN_FDS/inetd bridge
Interaction with known web sites/services (websites/):
github-api.py, CLI for Github API