How to grab the keypressed in terminal (useful for keybindings)
$ cat - (+ ENTER)
^[[H (fn + left)
#!/usr/bin/bash | |
#################### | |
# Docker | |
#################### | |
function docker-ps() { | |
docker ps --format 'table {{.Names}}\t{{.Image}}' | |
} | |
function docker-pa() { |
ssh-keygen -t rsa -b 4096 -C "gituser@email.com" | |
eval "$(ssh-agent -s)" | |
# if there is no 'config' file in ~/.ssh | |
touch ~/.ssh/config | |
---------------------------------- | |
# in file config, this will add ssh to keychain | |
---------------------------------- | |
Host * |
# *** note: These apps cause memory and cpu issues for me | |
# *** and this approach works fine for me on my mac, ii have not tested it on any other OS and cannot garantee anything | |
# *** so feel free to use them but dont blame me if shit goes boom | |
### Backup and Sync | |
for f in $(pgrep 'Backup and Sync'; pgrep 'FinderSyncAPIExtension'); do renice +20 -p $f; done | |
### Chrome | |
for f in $(pgrep 'Chrome'); do renice +20 -p $f; done | |
### Time machine |
minikube stop; | |
minikube delete | |
docker stop (docker ps -aq) | |
rm -r ~/.kube ~/.minikube | |
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube | |
systemctl stop '*kubelet*.mount' | |
sudo rm -rf /etc/kubernetes/ | |
docker system prune -af --volumes |