{"id":29948433,"url":"https://github.com/retifrav/bash-scripts","last_synced_at":"2026-04-12T16:08:11.622Z","repository":{"id":83211769,"uuid":"471147172","full_name":"retifrav/bash-scripts","owner":"retifrav","description":"My Bash scripts","archived":false,"fork":false,"pushed_at":"2025-07-13T14:12:46.000Z","size":174,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-13T16:10:51.169Z","etag":null,"topics":["bash"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/retifrav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null},"funding":{"github":["retifrav"]}},"created_at":"2022-03-17T21:24:43.000Z","updated_at":"2025-07-13T14:12:49.000Z","dependencies_parsed_at":"2024-08-29T19:21:40.628Z","dependency_job_id":"efc53f04-e708-4460-9cd5-0da4fb6f54a8","html_url":"https://github.com/retifrav/bash-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/retifrav/bash-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retifrav%2Fbash-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retifrav%2Fbash-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retifrav%2Fbash-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retifrav%2Fbash-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retifrav","download_url":"https://codeload.github.com/retifrav/bash-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retifrav%2Fbash-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268512163,"owners_count":24261889,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash"],"created_at":"2025-08-03T08:16:36.456Z","updated_at":"2026-04-12T16:08:11.611Z","avatar_url":"https://github.com/retifrav.png","language":"Shell","funding_links":["https://github.com/sponsors/retifrav"],"categories":[],"sub_categories":[],"readme":"## Bash scripts\n\nMy Bash scripts.\n\n\u003c!-- MarkdownTOC --\u003e\n\n- [lorem-ipsum](#lorem-ipsum)\n- [download-and-verify-archives](#download-and-verify-archives)\n- [temporary-file](#temporary-file)\n- [copy-files-with-rclone](#copy-files-with-rclone)\n- [generate-dependencies-list-from-vcpkg](#generate-dependencies-list-from-vcpkg)\n- [control-raspberry-pi-desktop-with-tv-remote-via-cec](#control-raspberry-pi-desktop-with-tv-remote-via-cec)\n- [navicat-reset-trial](#navicat-reset-trial)\n- [concat-steam-game-recording](#concat-steam-game-recording)\n\n\u003c!-- /MarkdownTOC --\u003e\n\n### lorem-ipsum\n\nLorem ipsum generator. Prints Lorem ipsum text to `./lorem-ipsum.txt` specified number of times:\n\n``` sh\n$ ./lorem-ipsum.sh -n 999\n```\n\n### download-and-verify-archives\n\nDownloads archives from links provided in a file using `cURL` and verifies their contents against \"blueprints\" (*text files with contents expected to be inside each archive*) using `diff`:\n\n``` sh\n$ ./download-and-verify-archives.sh -t \"ACCESS-TOKEN-HERE\"\n```\n\n### temporary-file\n\nBased on \u003chttps://stackoverflow.com/a/66070270/1688203\u003e.\n\nCreates a temporary file, performs some checks and sets a trap for deleting it afterwards:\n\n``` sh\n$ ./temporary-file.sh\n$ less ./some.log\n```\n\nThis is supposed to be used as a part of actual scripts for \"batched\" logging, when several process might be writing to the same log file, so you'd need to ensure that their logs rows are not mixed together.\n\n### copy-files-with-rclone\n\nCopies files with [rclone](https://rclone.org) from a remote server on cron schedule:\n\n``` sh\n$ mkdir ~/scripts ~/logs\n\n$ crontab -e\n```\n``` sh\n20 * * * * ~/scripts/copy-files-with-rclone.sh \u003e\u003e ~/logs/copy-files-with-rclone.log 2\u003e\u00261\n```\n\nDon't forget to remove `--dry-run` from `copy` commands.\n\n### generate-dependencies-list-from-vcpkg\n\nGenerates a text file with a lazy list of dependencies collected from listings in `vcpkg_installed/vcpkg/info/` folder:\n\n``` sh\nls -L1 /path/to/some/project/build/vcpkg_installed/vcpkg/info/ | head -5\nassimp_5.3.1_myvr-arm64-osx.list\nbrotli_1.1.0_myvr-arm64-osx.list\ncatch2_3.5.3_myvr-arm64-osx.list\nclara_1.1.5_myvr-arm64-osx.list\ncpp-base64_2.0.8_myvr-arm64-osx.list\n\n$ ./generate-dependencies-list-from-vcpkg.sh -p /path/to/some/project/build/vcpkg_installed/vcpkg/info/\n\n$ head -5 ./3rd-party.txt\nassimp_5.3.1\nbrotli_1.1.0\ncatch2_3.5.3\nclara_1.1.5\ncpp-base64_2.0.8\n```\n\n### control-raspberry-pi-desktop-with-tv-remote-via-cec\n\nControlling Raspberry Pi desktop with TV remote via CEC, more details [here](https://github.com/retifrav/bash-scripts/blob/master/control-raspberry-pi-desktop-with-tv-remote-via-cec/README.md).\n\n### navicat-reset-trial\n\nResetting [Navicat Premium](https://navicat.com/en/products/navicat-premium) trial (*on Mac OS*), because no one has 800 USD to pay for the license:\n\n``` sh\n$ ./navicat-reset-trial.sh\nFound Navicat folder, deleting it\nFound the preferences file: /Users/USERNAME/Library/Preferences/com.navicat.NavicatPremium.plist\nGot the trial key: THE-KEY-VALUE\n```\n\nOriginal author is [1monday](https://appstorrent.ru/802-navicat-premium.html#findcomment158332).\n\n### concat-steam-game-recording\n\nConcatenating Steam game recording fragments into a proper single video file:\n\n``` sh\n$ tree /home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video\n├── bg_9361349647978725376_20260103_151654\n│   ├── chunk-stream0-00001.m4s\n│   ├── chunk-stream0-00002.m4s\n│   ├── chunk-stream1-00001.m4s\n│   ├── chunk-stream1-00002.m4s\n│   ├── init-stream0.m4s\n│   ├── init-stream1.m4s\n│   └── session.mpd\n├── bg_9361349647978725376_20260103_151658\n│   ├── chunk-stream0-00001.m4s\n│   ├── chunk-stream0-00002.m4s\n│   ├── chunk-stream1-00001.m4s\n│   ├── chunk-stream1-00002.m4s\n│   ├── init-stream0.m4s\n│   ├── init-stream1.m4s\n│   └── session.mpd\n├── bg_9361349647978725376_20260103_151704_0\n│   ├── chunk-stream0-00001.m4s\n│   ├── chunk-stream1-00001.m4s\n│   ├── init-stream0.m4s\n│   ├── init-stream1.m4s\n│   └── session.mpd\n├── bg_9361349647978725376_20260103_151706_0\n│   ├── chunk-stream0-00001.m4s\n│   ├── chunk-stream1-00001.m4s\n│   ├── init-stream0.m4s\n│   ├── init-stream1.m4s\n│   └── session.mpd\n└── bg_9361349647978725376_20260103_151709\n    ├── chunk-stream0-00001.m4s\n    ├── chunk-stream0-00002.m4s\n    ├── chunk-stream0-00003.m4s\n    ├── chunk-stream0-00004.m4s\n    ├── chunk-stream1-00001.m4s\n    ├── chunk-stream1-00002.m4s\n    ├── chunk-stream1-00003.m4s\n    ├── chunk-stream1-00004.m4s\n    ├── init-stream0.m4s\n    ├── init-stream1.m4s\n    └── session.mpd\n\n$ ./concat-steam-game-recording.sh \\\n    -p /home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video \\\n    -r bg_9361349647978725376\n[DEBUG] Path to recordings: /home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video\n[DEBUG] Recording ID: bg_9361349647978725376\n[DEBUG] Path to output: ./out.mp4\n[DEBUG] Found FFmpeg: /usr/bin/ffmpeg\n[DEBUG] Temporary folder: /tmp/tmp.9VbN8P7Ww6\n\nProcessing [/home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video/bg_9361349647978725376_20260103_151654]...\nProcessing [/home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video/bg_9361349647978725376_20260103_151658]...\nProcessing [/home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video/bg_9361349647978725376_20260103_151704_0]...\nProcessing [/home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video/bg_9361349647978725376_20260103_151706_0]...\nProcessing [/home/deck/.local/share/Steam/userdata/YOUR-ID/gamerecordings/video/bg_9361349647978725376_20260103_151709]...\n\nConcatenating into the final video file...\n\n$ mpv ./out.mp4\n```\n\nNote that you might have several different recordings starting with the same prefix, so you might need to make it more precise (*by including the date/time too*).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretifrav%2Fbash-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretifrav%2Fbash-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretifrav%2Fbash-scripts/lists"}