{"id":28642058,"url":"https://github.com/Donearm/scripts","last_synced_at":"2025-06-12T22:03:17.799Z","repository":{"id":6349982,"uuid":"7586549","full_name":"Donearm/scripts","owner":"Donearm","description":"a collection of personal scripts and libraries","archived":false,"fork":false,"pushed_at":"2025-03-30T15:41:30.000Z","size":251,"stargazers_count":36,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T16:29:43.538Z","etag":null,"topics":["library","scripts","utilities"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Donearm.png","metadata":{"files":{"readme":"README.md","changelog":"newsbeuter_extract_titleurl.sh","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-01-13T09:51:07.000Z","updated_at":"2025-03-30T15:41:34.000Z","dependencies_parsed_at":"2024-12-10T17:35:00.430Z","dependency_job_id":null,"html_url":"https://github.com/Donearm/scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Donearm/scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donearm%2Fscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donearm%2Fscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donearm%2Fscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donearm%2Fscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Donearm","download_url":"https://codeload.github.com/Donearm/scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donearm%2Fscripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259539025,"owners_count":22873332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","scripts","utilities"],"created_at":"2025-06-12T22:01:53.801Z","updated_at":"2025-06-12T22:03:17.787Z","avatar_url":"https://github.com/Donearm.png","language":"Shell","funding_links":["https://ko-fi.com/W7W7KA0Z"],"categories":["Shell"],"sub_categories":[],"readme":"## Scripts\n\na collection of personal scripts. A few worked way back in time, some need a complete rewrite but 90% are perfectly usable.\n\n#### backlight\\_change.sh\n\nIncrease or decrease the screen's backlight. Should work with any backlight driver\n\n####  bigpkg.py\n\nList Archlinux's installed packages by size. By Allan McRae\n\n#### cert-hashing.sh\n\nHash a SSL certificate\n\n#### clitwitter.py\n\nOld script to post on Twitter with Basic Authentication. Need to be updated with\nOAuth but I've since switched to TTYtter\n\n#### compare\\_images.py\n\nA script to compare images in a directory for similarity. It returns \nonly those similar but not identical in a list. At this moment the list \ncontains all images that have at least another very similar but doesn't \ncheck if they are similar with all the other images in the list, ending \nup with different couples of similar images but not all very similar. I \nfound it too long to loop again and again to check all the images among \nthemselves or return different lists for each group of similar images\n\n#### cortex\\_reddits.py\n\nBrowse (sub)reddits with the Reddit client cortex. Totally an hack, subscribing \nthem on Reddit is much easier but I didn't want to read all my subscriptions \neach time so I wrote this script to choose what and when to browse\n\n#### csv\\_to\\_md\\_files.py\n\nA script, not mine, that converts a CSV file to a series of markdown files \nbased off the first column of the CSV file. It is useful to export sheets from \nExcel or GDocs to markdown to be edited then in Obsidian\n\n#### dayoftheweek.py\n\nNot my script originally, I just made it Python 3.2 compatible\n\n#### delete\\_by\\_percentage.lua\n\nDelete a random choice of files in a directory by a given percentage. Seems \ntotally pointless but you'll never imagine the use case that made me write it... \n:)\n\n#### deploy.sh\n\nDeploy script for dotfiles here on Github. Untested.\n\n#### dizionario\\_sqlscript.lua\n\nSearch and insert words and definitions in a SQLite dictionary of multiple \nlanguages\n\n#### dwm\\_start.sh\n\nBoot script for DWM\n\n#### dzenstatusbar.sh\n\nA simple dzen statusbar\n\n#### dzenweather.sh\n\nWeather script with icons for Dzen\n\n#### feh\\_or\\_browser.lua\n\nUseful for Newsbeuter or other similar cli softwares that can't show images in \nterminals. It checks whether a url is to an image, and open it in feh, or to \nsomething else, and open it in the browser\n\n#### fehgallery.lua and fehgallery.py\n\nSort images in a directory and feed them to feh. Also, delete feh's filelist \nfiles if present. Same script written in Lua and Python\n\n#### get\\_ip.py\n\nPrint the current IP. Both IPv4 and IPv6 are shown\n\n#### hdbenchmark.sh\n\nA very raw HD benchmark tool\n\n#### i3lock-script.sh and i3lock-dracula-script.sh\n\nA couple of scripts to launch i3lock-color with some specific settings. Nothing \ntoo fancy, mostly copied from the official repo and from the [dracula theme \nrepository](https://github.com/dracula/i3lock-color) for i3lock-color.\n\n#### imap\\_check.py\n\nCLI unread count of my 2 GMail accounts. I used this as input for an AwesomeWM \nwidget before the gmail one from vicious was implemented. Nowadays it's \nsuperfluous (and in need of refactoring...)\n\n#### imgtags.py\n\nRemove exiv tags from all the images in the current directory. People add all \nsorts of absurd tags to their images...\n\n#### instahashtag.py\n\nA script to download the latest 30 posts matching an hashtags' list on \nInstagram. Requires instaloader\n\n#### lib/basename.lua\n\nThe basename shell command implemented in Lua\n\n#### lib/benchmark\\_clock.lua\n\nA quite raw benchmark for Lua scripts\n\n#### lib/compare\\_table.lua\n\nCompare tables for equality, after having \"setified\" them, in Lua\n\n#### lib/dirname.lua\n\nThe dirname shell command implemented in Lua\n\n#### lib/dns\\_lookup.js\n\nDNS lookup in NodeJS\n\n#### lib/generate\\_random\\_ints.lua\n\nRandom number generator\n\n#### lib/get\\_home\\_dir.go\n\nGet current user's home directory\n\n#### lib/iterate\\_nested\\_tables.lua\n\nIterate over nested tables in Lua\n\n#### lib/list\\_files.lua\n\nList files with just `ls` instead of using `lua-filesystem` (which has more \nfeatures of course)\n\n#### lib/markdown-print.css and lib/markdown.css\n\nCss for markdown files converted to html, printed or shown on screen\n\n#### lib/markdowntohtml.go\n\nGo parser of Markdown file to HTML\n\n#### lib/must\\_run.go\n\nQuick wrapper for error checking for functions that must run (panic if don't)\n\n#### lib/parse\\_cli\\_arguments.lua\n\nA skeleton of a function parsing cli arguments in Lua\n\n#### lib/prime\\_numbers.go\n\nA generator of prime numbers based on Goroutines and channels\n\n#### lib/secs2minutes.lua\n\nConvert an integer representing the seconds in minutes or a full representation \nof a clock (HH:MM:SS)\n\n#### lib/web\\_server.go\n\nDead simple web server in Golang\n\n#### magnet\\_link\\_to\\_torrent.sh\n\nOutput a magnet link to a torrent file to save it for future re-use\n\n#### make\\_gif.sh\n\nMake a gif from a video using FFmpeg. Quick and Dirty (size, duration are hardencoded).\n\n#### maps\\_client.go\n\nScript to query the Google Maps API for results matching a specific category of places around Krakow. This was a base for a full web app that never saw the light. An API key is needed\n\n#### markdownitall.lua\n\nConvert all markdown files in a path to html\n\n#### mplayerss.lua\n\nLaunch MPlayer while disabling screensaver, DPMS settings and any compositing \nmanager. When MPlayer exits, it reapplies the previous settings\n\n#### naut-bulkrename.sh, naut-feh\\_slide.sh and naut-urxvt.sh\n\nLaunch scripts for Nautilus. Not actually using them since years\n\n#### net\\_data\\_sum.py\n\nSave network upload and download statistics in a file. Sum the numbers if from \nthe same day (to take into account reboots)\n\n#### newsbeuter\\_extract\\_titleurl.sh\n\nOutput url and title from an article in newsbeuter in a file. I used, and \noccasionally use still, this to tweet the interesting news from the rss feeds I \nfollow\n\n#### nofollow-dofollow.js\n\nQuick script for the browser console to check whether links on a page \nare nofollow or dofollow.\n\n#### pick\\_random\\_file.sh\n\nReturns the name of a file, randomly picked in a given path among those \nmatching an extension (or any kind of file at all if no extension is \nselected)\n\n#### plowdown\\_parallel.sh\n\nUse plowdown to download in parallel when downloading from different sites\n\n#### pyscreenshoter.py\n\nTake a desktop screenshot with just a few Python lines\n\n#### randomman.lua\n\nRandomly choose and open a manpage. I found this to be an extremely quick and \nfunny way to discover hidden features and commands of your system\n\n#### rmtrash.py\n\nRemoving some useless directories/files in ~\n\n#### script\\_awesome\\_debug.sh\n\nDebug AwesomeWM with Xephyr. It can easily adapted to any other WM\n\n#### script\\_bandwidth\\_archive.sh\n\nSave bandwidth stats to a text file, ready to be loaded in Tiddlywiki\n\n#### script\\_bbcode\\_formatting.sh\n\nFormat files containing BBCode. More informations in the script itself\n\n#### script\\_bigger\\_than\\_M.sh\n\nPrint files and directories that are bigger than 1Mb. I use this to discover \nwhat is eating up all the disk space in a partition\n\n#### script\\_blog\\_backup.sh\n\nA pretty basic, and not that useful, blog/site backup script\n\n#### script\\_clean\\_gopath.sh\n\nClean using `go clean` archive files and executable binaries created \nwith `go install` and `go get` in your `$GOPATH`\n\n#### script\\_clean\\_vim\\_undodir.sh and script\\_clean\\_vim\\_views.sh\n\n2 scripts to clean undodir and views directories under `~/.vim/` to delete \nreferences to files that are not present anymore on disk and thus save space. \nProbably not useful today with \u003e1TB disks but I hate wasting space\n\n#### script\\_disable\\_touchpad.sh\n\nLaunched at boot from your WM/DE, it detects thanks to xinput whether a \nmouse is present or not and disable/enable the touchpad accordingly. It \ngoes along with the udev rules, completing it as with udev it can only \nbe detected when a mouse is plugged in or off, not when it's already \nplugged in at boot. \"Lachesis\" is my mouse, of course\n\n#### script\\_dl\\_single\\_github\\_file.sh\n\nDownload a single file from a specific repository on Github\n\n#### script\\_dos\\_unix.sh\n\nConvert Dos/Unix newline format\n\n#### script\\_download\\_images.sh\n\nDownload all images on a webpage with Curl. Does not check the type of image nor check if it is already present (it will overwrite images with the same name) but for a quick job it's ok. Readapted from a script found months ago on the web\n\n#### script\\_efi\\_menu\\_restore.sh\n\nRestore UEFI boot menu entries. Of course only those I use/care about\n\n#### script\\_entropy.sh\n\nAn entropy-generating script. I use this when I need to overwrite a partition or \ndisk with random data for security reasons. As I'm paranoid, `/dev/urandom` \nisn't enough\n\n#### script\\_exif\\_clean.sh\n\nA wrapper for imgtags.py\n\n#### script\\_extract\\_ip.sh\n\nExtract all URLs from a file\n\n#### script\\_flash\\_video\\_save.sh\n\nSave the flash video opened in firefox. Not working with all files/sites\n\n#### script\\_flush\\_thumbnails.sh\n\nRemove all those `.thumbnails/` directories under a path. I hate keeping 5 years \nold thumbnails of files that have been removed ages ago...\n\n#### script\\_ip4toip6.sh\n\nConvert an IPv4 address to its IPv6 equivalent\n\n#### script\\_list\\_files\\_number\\_in\\_subdirectories.sh\n\nPrint the number of files in each subdirectory of a given directory\n\n#### script\\_lock\\_screen.sh\n\nA double script that launches on suspend. If running under Wayland, it uses \n`swaylock` to lock the screen, otherwise it is assumed it is X11 and uses \n`i3lock`\n\n#### script\\_loop\\_ff\\_profile.sh\n\nMove Firefox profiles in a file mounted in memory\n\n#### script\\_make\\_thumbs.sh\n\nCreate thumbnails for images in a directory\n\n#### script\\_merge\\_html.sh\n\nMerge all html files in a directory in a single page\n\n#### script\\_music\\_to\\_android.sh\n\nTransfer a directory containing music to the sdcard `Music/` directory on\nAndroid phones. Not using this anymore, mounting the phone via usb is quicker\n\n#### script\\_mutt\\_mailto.sh\n\nOpen mailto links in mutt\n\n#### script\\_pdf\\_to\\_jpeg.sh\n\nExtract every page of a pdf as jpg images\n\n#### script\\_pianobar\\_update\\_proxy.sh\n\nUpdate the proxy address used by pianobar to access Pandora outside the US\n\n#### script\\_playlist\\_make.sh\n\nMake a playlist out of music files in a directory and optionally convert flacs \nto oggs\n\n#### script\\.print\\_total\\_size\\_of\\_online\\_directory.sh\n\nPrint the total size, in MB, of an online directory, publicly accessible, by \ndownloading all the headers of the files, extracting their size in bytes, and \nsumming them up\n\n#### script\\_print\\_utf8.sh\n\nOutput a serie of Unicode characters on the terminal. For the times when you \nknow there's a character in the Unicode table but don't know the code and can't \nremember the name. Of course I've only added those I find more useful\n\n#### script\\_private.sh\n\nMount my private, cryptsetup encrypted partition and start the MPD daemon. \nAutomatic detection of different partition, on desktop or laptop\n\n#### script\\_proxy\\_checker.sh\n\nCheck whether a proxy is working and is from the US by trying to access \npandora.com (as it is blocked here in Italy, if I can access it it must be an US \naddress)\n\n#### script\\_rate\\_music.sh\n\nAdd currently playing song in MPD to a playlist using ncmpcpp or cmus (quite \neasily expanded for other players). The original script allowed only to rate \nsongs in aptly named playlists (1 to 5) but this permits to use any name for the \nplaylist\n\n#### script\\_ripencode.sh\n\nAudio cd ripping script (to mp3, ogg or flac)\n\n#### script\\_touchpad.sh\n\nDisable/enable the touchpad. When writing long texts on a laptop the fingers can \nmove the pointer and it's annoying. Disabling the touchpad removes the problem\n\n#### script\\_transmission\\_notify.sh\n\nA libnotify notification for completed torrents in Transmission\n\n#### script\\_ttytter\\_now\\_playing.sh\n\nTweets current playing song (from ncmpcpp) via TTYtter. This must be configured \nalready\n\n#### script\\_video\\_thumbnails.sh\n\nThis is a old script, but still working, that I used when I did some video \nediting. Basically it generates an image containing informations such as \nfilename, size, lenght and codec of a video along with a series of thumbnails to \nshow off its content. I never tweaked it more than \"black backround, fixed \nspacing between thumbs\" though, I just needed something that didn't force me to \ndepend on external programs.\n\n#### script\\_wd\\_cryptousb.sh\n\nMount an encrypted partition on a usb hd that I use for backups.\n\n#### script\\_wifi\\_control.sh\n\nCompletely disable and power off the Atheros wifi card on the Asus 1005H netbook\n\n#### script\\_xdg\\_setup.sh\n\nA super-raw and quick script to set up the main files associations with \nxdg-open\n\n#### script\\_xwinwrap-video.sh\n\nUse a video as desktop background with xwinwrap. I have no idea why anybody \nwould want to but it's a funny trick\n\n#### script\\_zfs\\_private.sh\n\nA script to mount an encrypted ZFS dataset. Mostly the equivalent of script\\_private.sh\n\n#### showip.c\n\nShow IP addresses for a host\n\n#### sopcast.go\n\nA launcher for Sopcast streaming links. I had a Bash function for this \nbut it was convoluted to kill the Sopcast process when exiting the video \nplayer. Go handles this case much more easily\n\n#### systemd/clean\\_imagemagick\\_tmpfiles.timer and systemd/clean\\_imagemagick\\_tmpfiles.service\n\nTimer and service to clean ImageMagick's temporary files created in /tmp and not properly cleaned (see issue [395](https://github.com/ImageMagick/ImageMagick/issues/395))\n\n#### systemd/disable\\_interrupt.service and systemd/disable\\_interrupt.timer\n\nTimer and service to disable a misbeaving acpi interrupt (happens with some specific hardware or BIOSes)\n\n#### systemd/kodi.service\n\nSystemd service to start Kodi (used on a RaspberryPi)\n\n#### systemd/lock\\_suspend.service\n\nLock, using physlock but any other locker may be used, the session on lid closing signal\n\n#### systemd/lock\\_on\\_lid\\_close.sh\n\nA post and pre hook to lock after and before suspend when running under \nWayland. Not used anymore, left as an example of these hooks\n\n#### systemd/network.service\n\nSystemd service for wired networks\n\n#### systemd/overwrite-hosts.service and systemd/overwrite-hosts.timer\n\nA service and timer couple to overwrite every 10 minutes the /etc/hosts file\nwith a copy that is on one of my personal directories. That's because the file\nit's automatically generated by copying blacklists from the internet of\nadvertisement/malware/adware/etc. to ban every few minutes and I need\n/etc/hosts to be synced with this updated file\n\n#### systemd/stash.service\n\nA systemd service to run stash app as a server (on a Raspberry Pi in my case but can be ran anywhere)\n\n#### systemd/zfs-scrub@.timer and systemd/zfs-scrub@.service\n\nTimer and service to do a monthly ZFS scrubbing\n\n#### systemd/ttytter-screen.service and systemd/ttytter-tmux.service\n\nLaunch TTYtter under screen or tmux as a self-respawning daemon with Systemd\n\n#### tmux\\_sites\\_projects.sh\n\nOpen a 3 windows tmux session, one for each of html, css and js files to\nedit. Specifically made for website projects\n\n#### tmux\\_workon\\_project.sh\n\nOpen 2 split windows in tmux, changing paths to the project's to work on\n\n#### ttytter\\_startup.sh\n\nOld shell TTYtter startup script that I used before switching to Systemd. It \nchecks whether a tmux session containing TTYtter is already running and \nreattaches to it or if it's not, launch one. This is for WM that are launched by \n\\startx as a DM implements already the same functionalities\n\n#### validate\\_yaml.py\n\nA wrapper around pyyaml to quickly validate a yaml file from the command \nline\n\n#### watermarking.sh\n\nQuick script to add a watermark on an image. Used for copyrighting my \nimages at the moment\n\n## Donate \n\n[![ko-fi](https://www.ko-fi.com/img/donate_sm.png)](https://ko-fi.com/W7W7KA0Z)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDonearm%2Fscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDonearm%2Fscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDonearm%2Fscripts/lists"}