One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
kubectl get pods --field-selector=status.phase=Failed --no-headers=true | awk '{print $1}' | xargs kubectl delete pod |
# first install pygmentize to the mac OS X or macOS system with the built-in python | |
sudo easy_install Pygments | |
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc. | |
alias pcat='pygmentize -f terminal256 -O style=native -g' |
nmap -sP 192.168.1.0/24 | awk '/is up/ {print up}; {gsub (/\(|\)/,""); up = $NF}' |
# This is a general-purpose function to ask Yes/No questions in Bash, either | |
# with or without a default answer. It keeps repeating the question until it | |
# gets a valid answer. | |
ask() { | |
# https://gist.github.com/davejamesmiller/1965569 | |
local prompt default reply | |
if [ "${2:-}" = "Y" ]; then | |
prompt="Y/n" |
## Quick fix for slow internet after update to OSX 10.11 "El Capitan" | |
## Changes are not permanent, just restart your mac if it doesn't work. | |
## write config | |
sudo su - | |
sysctl -w net.inet.tcp.doautorcvbuf=0 | |
sysctl -w net.inet.tcp.doautosndbuf=0 | |
sysctl -w net.inet.tcp.win_scale_factor=0 | |
sysctl -w kern.ipc.somaxconn=2048 | |
sysctl -w net.inet.tcp.rfc1323=1 |