OpenScripts
OpenScripts is a collection of some of my scripts/generic programs for personal use:
- algorithms
ll_node.rb
: a simple implementation of a (singly-)linked list, that I sometimes used when exercising
- concurrency
interruptible_job_scheduler.rb
: a scheduler for interruptible process-based job(s)
- documents
generate_wiki_home_toc
: generates theHome.md
file of a (GitHub) wiki repository, with a table of contentsupdate_markdown_chapter_references
: generates/updates a Table Of Contents, and navigation links, in a collection of Markdown documentsupdate_markdown_toc
: generates/updates a Table Of Contents, for a single Markdown document
- generic
bedtime
: sets two (systemd) timers, one to suspend the computer, and the other to shut it downcompress_dvd
: compresses an unencrypted DVD iso to h265/aacconvert_cb_archive_to_pdf
: convert CBR/CBZ files to PDFconvert_video_to_animated_gif
: convert a video to animated gid (via FFmpeg)control_music_player
: performs actions on a music player running in the background (supports Clementine, MPV, GMusicBrowser...)encode_to_m4a
: encodes and normalizes input files to m4a, using ffmpeg/libsdk_aacfill_dhl_packet_slip
: fills a DHL packet slip, and opens an OpenDocument page with itfill_labels
: prepares an OpenDocument page with addresses, to be printed on a standard A4 page with 96x50.8mm labelsmk_invoice
: prepares a generic (software engineering) invoice in Office Open XML format, using a template, and the data provided in the configuration filenormalize_flac_tracks
: renames, removes the current tags, and add replay gain, to flac filesplot_2y_diagram
: plots a diagram with two y scales from a text file, via GNU Plot (and Ruby)plot_diagram
: plots a diagram from a text file, via GNU Plot (and Ruby), with better support for batch processing thanplot_2y_diagram
record_desktop
: records a video of the desktop, using FFmpegspell
: spell a phrase, with customizable alphabetssplit_cue_audio_file
: splits an audio file based on the provided cue filetexerak
: convenient wrapper around Tesseract, to OCR images/documents
- git
git_find_default_branch
: finds and prints the default branch; if 'origin/HEAD' is not present, it sets itgit_maintain_branches
: purge all the branches (local, and their remote tracked) without commits that aren't in the main branch; also syncs with upstreamgit_rename_commits
: rename git commits, using the old git (filter-branch
) method
- programming
build_kernel
: builds the Linux kernel, with some automationsgit_full_delete_branch
: checked deletion of branch (local and remote)git_merge_file_commits
: Merge the commits including a given file, in a Git repositorymeld
: wrapper around meld, that opens two blank panels, if no files are passedprettify
: prettifies files; supports XML and JSONrename_variables
: rename variables/constants with composite namesship_gem
: ships a gem, performing all the maintenance operation (version increase, tag, build, push, ...)unpack_gem
: unpacks a gem, with additional operations like directory creation, gemspec extraction (when not present), etc.
- system
clean_kernel_packages
: uninstall the redundant kernel packages, keeping only the current, and the latest (past or future)clean_recents
: clean the recent used file entries whose basename matches the specified patternsconnect_bt_device
: connects a BT device, working around the complete garbage that is Bluetooth, Bluez, and the BT Ubuntu supportdesnapped
: starts the snap services, run the specified snap, and stops the snapd servicesdowner
: download and automatically install packages/images from web pagesdownload_ubuntu_packages
: downloads Ubuntu packages from the chosen distro; useful for people "manually backporting" packages (eg.linux-firmware
)cpfloppy
: copy the content of multiple floppy images (IMG) to a specified direjectdisk
: unmounts and powers off a device, or all the connected USB storage devicesft(_function)
: very handy script for extracting a token/line from the output of a commandgitio
: generate a short GitHub URL, and copy it to the clipboardinstall_btrfs_checker
: monthly scrubs the BTRFS partitions and notifies the user on logoninstall_smart_notifier
: notifies the user on logon, when smartd finds a problem with any diskmaestral_upgrade
: upgrades and restarts Maestralmanage_bt
: enable a BT device if present, opens the BT manager, then disables the devicemkfloppy
: create a floppy image (IMG) from the specified files/dirsmylast
: runs the last executed MySQL query, and copies the result to the clipboardmysql_collect_stats
: collects MySQL server statistics over a session (global status values), in a convenient structure for processingmysql_plot_diagrams
: plots diagrams (via GNU Plot), with the stats collected viamysql_collect_stats
mystart
/mystop
: start/stop MySQL, automatically switching between version, and preparing the dataownsync
: command line sync script for Owncloud/Nextcloud, with conflicts handlingpatch_acpi_s3_support
: patch and hook the DSDT tables with S3 support (see article)purge_trash
: purge the trash files trashed before a certain threasholdscript_template
: create a Bash script template, and sets the permissionssend_display_to_sleep
: send the display to sleep, working around GNOME's screensaver interferenceupdate_mainline_kernel
: automatically installs the latest version of the current (or chosen) kernel, from the Ubuntu mainline buildswinetmp
: conveniently run Wine applications in a temporary, sandboxed, environmentxcalib_safe
: wrapper around xcalib, which detects error states, and warns the user (and exits with error code)
I keep adding new content/update old ones.