sudo systemctl disable dphys-swapfile.service
sudo systemctl disable zram-swap.service
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \ | |
assaflavie/runlike <container> |
#!/bin/sh | |
#run this in all open terminals | |
history -a | |
# run this in the terminal where history (raw and sorted) is being captured | |
history -a; history -c; history -r | |
# capture the history to a file | |
# because sometimes order of operations matters |
#!/bin/sh | |
# based on this https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html#finding-an-ami-aws-cli | |
aws ec2 describe-images --owners 099720109477 --filters 'Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-????????' 'Name=state,Values=available' --query 'reverse(sort_by(Images, &CreationDate))[:1].ImageId' --output text |
setw -g mode-keys vi | |
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'" |
for i in $(docker ps | cut -f 1 -d " " | grep -v CONTAINER); do docker stop $i; docker rm $i; done |
This set of scripts enables quick ssh access to a group of similarly named machines
generate-instance-list.sh
to get a list of aws instance idsssh-connect.sh
against the generated list to access any of the instancesCurrently it is not possible to differentiate the machines easily - enable access by more human readable names in the generated instance list.
sbin/generate-instance-list.sh -n mak3r-rancher-training-k3s > instance-ids.json
sbin/ssh-connect.sh -i 0 -k ~/.ssh/mak3r-private.pem -s