This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$4" == "" ]; then | |
echo "usage: $0 <local_ip> <remote_ip> <new_local_ip> <new_remote_ip>" | |
echo "creates an ipsec tunnel between two machines" | |
exit 1 | |
fi | |
SRC="$1"; shift | |
DST="$1"; shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Shell scripts for get image manifest from v2 registry | |
# | |
# Tested on Debian 8, curl 7.38.0, jq-1.5 | |
# | |
set -e -u | |
# Default tag is latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
get_domain_name() { | |
echo "$1" | awk -F/ '{print $3}' | sed 's/:.*//' | |
} | |
URLS=$(cat <<-END | |
http://1.1.1.1 | |
http://1.1.1.1:8443 | |
https://1.1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
/* | |
* rmsg | |
* | |
* Procedure to print messages | |
*/ | |
DROP PROCEDURE IF EXISTS rmsg$$ | |
CREATE PROCEDURE rmsg(msg VARCHAR(255)) | |
BEGIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done | |
rm -rf /etc/ceph \ | |
/etc/cni \ | |
/etc/kubernetes \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# https://rancher.com/docs/rancher/v2.x/en/cluster-admin/cleaning-cluster-nodes/ | |
# sudo -i | |
docker rm -f $(docker ps -qa) | |
docker rmi -f $(docker images -q) | |
docker volume rm $(docker volume ls -q) |