{"id":15484292,"url":"https://github.com/stasadev/bash-scripts","last_synced_at":"2026-04-11T03:15:50.242Z","repository":{"id":118286366,"uuid":"572547888","full_name":"stasadev/bash-scripts","owner":"stasadev","description":"A collection of bash scripts that I can share publicly","archived":false,"fork":false,"pushed_at":"2024-09-21T13:25:50.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T06:26:24.072Z","etag":null,"topics":["bash","docker","git","laravel","linux","php","scripts","shell","systemctl","zip"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stasadev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2022-11-30T14:08:25.000Z","updated_at":"2024-09-21T13:25:54.000Z","dependencies_parsed_at":"2024-01-14T01:21:14.556Z","dependency_job_id":"0a34e09b-5a67-4ae1-9d72-19f7a4802cca","html_url":"https://github.com/stasadev/bash-scripts","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"75725a6ca8a4880292903ee1c1e3d9a14c9a1fef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasadev%2Fbash-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasadev%2Fbash-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasadev%2Fbash-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stasadev%2Fbash-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stasadev","download_url":"https://codeload.github.com/stasadev/bash-scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246052862,"owners_count":20716103,"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":["bash","docker","git","laravel","linux","php","scripts","shell","systemctl","zip"],"created_at":"2024-10-02T05:40:17.174Z","updated_at":"2026-04-11T03:15:50.233Z","avatar_url":"https://github.com/stasadev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bash Scripts\n\nA collection of bash scripts that I can share publicly.\n\n![platform](https://img.shields.io/badge/platform-Linux-blue.svg)\n![license](https://img.shields.io/github/license/stasadev/bash-scripts)\n\n## Quick Start\n\nClone this git repo to a fixed location on your computer and add [bash-scripts/bin](bin) it to your `$PATH`.\n\n```bash\ncd ~\ngit clone https://github.com/stasadev/bash-scripts.git bash-scripts\ncd bash-scripts/bin\nexport PATH=\"$(pwd):$PATH\"\n```\n\n## Docker App [docker-app](docker_app.sh)\n\nWhen using a dockerized application, you usually run it from a terminal and do all the boring work like port forwarding, mounting directories, starting/stopping/pulling containers, etc.\n\nIt is better to prepare everything in a script, and create a desktop shortcut to quickly start/stop the application.\n\nI added a quick way to launch (thanks to all the developers of these apps):\n* [Buggregator](https://github.com/buggregator/server): ultimate debugging server for PHP\n* [MeTube](https://github.com/alexta69/metube): youtube-dl web UI\n* [Mozhi](https://codeberg.org/aryak/mozhi): alternative-frontend for many translation engines\n* [SearXNG](https://github.com/searxng/searxng): privacy-respecting, hackable metasearch engine\n* [Rembg](https://github.com/danielgatis/rembg): tool to remove images background\n* [ASF](https://github.com/JustArchiNET/ArchiSteamFarm): Steam cards farming\n\nFor help, run `docker-app`.\n\nTo install an app from the list above, run the first time setup `docker-app setup [app-name]`. It will create a desktop shortcut at `~/.local/share/applications/[app-name].desktop`. When you run this shortcut it starts the container, a second run of this shortcut stops the container.\n\nYou can change the mount directory, application port and image tag using env variables, edit the desktop shortcut like this:\n\n```text\nExec=bash -ci \"DOCKER_APP_MOUNT_DIR=/custom-path DOCKER_APP_PORT=12345 DOCKER_APP_TAG=latest docker-app interactive [app-name]\"\n```\n\n## Git Mass [git-mass](git_mass.sh)\n\nWhen you have several git repos in one parent directory, it becomes hard to keep everything up to date. You need to go in every directory and pull one by one.\n\nI created a script that can run git commands on multiple repositories in parallel, including submodules.\n\n[hub](https://github.com/github/hub) can be used under the hood.\n\nFor help, run `git-mass`.\n\nI like to run `git-mass pull` every day when I start work to stay in sync with all repos.\n\n```text\n$ pwd\n/home/user/repos\n\n$ ls\ngit-repo-1 git-repo-2\n\n$ git-mass pull\nPull '/home/user/repos/git-repo-1'\n\nremote: Enumerating objects: 11, done.\nremote: Counting objects: 100% (11/11), done.\nremote: Compressing objects: 100% (11/11), done.\nremote: Total 11 (delta 1), reused 0 (delta 0), pack-reused 0\nFrom github.com:private-repo/git-repo-1\n * [new branch] feature/new-report -\u003e origin/feature/new-report\nAlready up to date.\n\n'/home/user/repos' done 2 repo(s).\n```\n\nTo execute any git command in serial mode, such as `git status`:\n\n```text\n$ git-mass git status\nRunning 'git status' in '/home/user/repos/git-repo-1'...\nOn branch main\nYour branch is up to date with 'origin/main'.\n\nnothing to commit, working tree clean\n\nRunning 'git status' in '/home/user/repos/git-repo-1'...\nOn branch main\nYour branch is up to date with 'origin/main'.\n```\n\n## PHP After [php-after](php_after.sh)\n\nWhen you clone an existing repo or create a new repo for a PHP project, you need to do some work, for example:\n\n* install composer packages,\n* set correct the file permissions (if someone mixed them up),\n* reset git repo to its original state (remove all gitignore files),\n* integrate code style rules,\n* and so on.\n\nThis script will help you to do everything in one go.\n\nFor help, run `php-after`.\n\nThe main focus is made on Laravel projects.\n\n```bash\n# add slack integration\nphp-after laravel slack\n# add ide-helper integration\nphp-after laravel ide\n# upgrade the repo to latest laravel version\nphp-after laravel upgrade\n# and many other commands...\n```\n\n## PHP Create [php-create](php_create.sh)\n\nWhen you create a new PHP framework project, the installation script provided by framework team tries to execute `composer install`, but your local environment may not be compatible with that particular version of the framework. Or you need to install a specific version of the framework, but you don't want to search for the exact command you need to run.\n\nFor help, run `php-create`.\n\nFor example, you need to create an old Laravel 5.5 project with Composer v1 support. You will need to prepare an environment just to run `composer install`. But you can't do that until you get the project files. It's kind of like a race where you have to do something before you can do something else.\n\nThat's why I created this script, you just install the project files and then run a certain command in an isolated environment.\n\n```bash\n# create a new laravel 5.5 skeleton in laravel55 folder\nphp-create laravel 5.5 laravel55\n# go inside\ncd laravel55\n# prepare the environment (old php version, composer v1, etc.)\ntouch docker-compose.yml\n# and run composer install on the container laravel55\ndocker-compose exec laravel55 composer install\n```\n\n## Systemctl Toggle [systemctl-toggle](systemctl_toggle.sh)\n\nSometimes you need to start some `systemctl` service for a while and then stop it. This script will help you do that without remembering whether you started or stopped it.\n\nFor help, run `systemctl-toggle`.\n\n```bash\n# start it\nsudo systemctl start service-name.service\n# and then stop it\nsudo systemctl stop service-name.service\n\n# and do the same with my script (run it two times to start/stop)\nsystemctl-toggle service-name\n\n# for user unit add flag -u\nsystemctl-toggle service-name -u\n```\n\n## WireGuard VPN [wireguard-vpn](wireguard_vpn.sh)\n\nScript to start/stop WireGuard on your machine by interface name.\n\nFor help, run `wireguard-vpn`.\n\n## Zippy [zippy](zippy.sh)\n\nScript to archive a folder including/excluding specific files/folders. Works perfectly for zipping multiple git repos into a single archive, except for large directories that you normally don't need (`vendor`, `node_modules`, etc.).\n\nFor help, run `zippy`.\n\n## License\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstasadev%2Fbash-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstasadev%2Fbash-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstasadev%2Fbash-scripts/lists"}