Skip to content

exbotanical/shcripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash Utils

Author: Matthew T Zito (goldmund)
License: MIT

Table of Contents

Inventory

Productivity
  • 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
Git Hooks
  • no-env - catch .env files in the staging area and prevent them from being included in your git commits. includes installer script
Logging
  • print_log_events - print from a given log file only those events executed by the current user
Configuration
  • 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)
Utility Scripts
  • 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
Miscellaneous

Installation & Usage

Download: curl -O https://raw.githubusercontent.com/exbotanical/shcripts/master/scripts/<script_name.bash>

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

Releases

No releases published

Packages

No packages published

Languages