Code Monkey home page Code Monkey logo

shcripts's Introduction

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

shcripts's People

Contributors

exbotanical avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

binaryphile

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.