https://github.com/exbotanical/shcripts
Myriad shell scripts for everything and anything
https://github.com/exbotanical/shcripts
bash linux productivity-tools sed shell-scripts useful-scripts
Last synced: about 1 month ago
JSON representation
Myriad shell scripts for everything and anything
- Host: GitHub
- URL: https://github.com/exbotanical/shcripts
- Owner: exbotanical
- License: mit
- Created: 2020-11-16T00:11:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-13T20:39:33.000Z (about 3 years ago)
- Last Synced: 2023-03-04T10:26:28.313Z (over 2 years ago)
- Topics: bash, linux, productivity-tools, sed, shell-scripts, useful-scripts
- Language: Shell
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bash Utils
```
Author: Matthew T Zito (goldmund)
License: MIT
```## Table of Contents
- [Inventory](#enum)
- [Productivity](#prod)
- [Git Hooks](#hooks)
- [Logging](#log)
- [Configuration](#conf)
- [Utility](#util)
- [Misc](#misc)
- [Installation & Usage](#use)* `git_bootstrap` - bootstrap a new git repository with .gitignore and README files
* `bash_bootstrap` - bootstrap a new bash script with a formatted header, add execute permissions, launch in text editor
* `docker_clean` - stop all running processes for given Docker images; remove them, purge all resulting dangling images and volumes
* `mkalias` - create permanent aliases; adds a *.mkalias.conf* file to user's home dir and sources it in user's bash runtime config. all aliases are stored in *.mkalias.conf** `no-env` - catch .env files in the staging area and prevent them from being included in your git commits. includes installer script
* `print_log_events` - print from a given log file only those events executed by the current user
* `flush_iptables` - flush all firewall rules, tables, chains, and mangles
* `enable_port_fwd` - enables port forwarding
* `edit_hosts` - Add or remove a line to/from /etc/hosts by IP & hostname (run as root)* `intconv` - convert a binary or hexadecimal value to decimal
* `fp` - functional programming utils for bash
* `kill_port` - kill the process listening on a given port
* `shutil` - ultimate utilities sourceable**Download:** `curl -O https://raw.githubusercontent.com/exbotanical/shcripts/master/scripts/`
##### no-env | Keep .env files out of your git history
This package includes a pre-commit hook and an installer script. Once installed, the hook executes *before* you make a git commit; it parses the staging area for any `.env` files. If a `.env` file is found, the commit will be aborted and you'll be notified.At this point, you may want to include the `.env` file(s) in your `.gitignore`. If you wish to commit the file(s) anyway, you can bypass the hook with `git commit --no-verify` *or* you can set the option `git config hooks.allowenv true` - the script will then ignore `.env` files until set to `false`.
**Instructions:**
1. Download the hook & installer to your repository root:
`curl -O "https://raw.githubusercontent.com/exbotanical/shcripts/master/hooks/no-env/{no-env.sh,installer}"`
2. Add execute permissions to the installer:
`chmod u+rx installer`
3. Execute the installer:
`./installer`