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 | |
IP=$1 | |
# Run curl file.sh | sh to find the public ip address | |
if [ "$IP" = "" ]; then | |
echo "Your IP is: " | |
curl https://ipinfo.io/ip | |
else | |
# Run curl file.sh | sh -s "0.0.0.0" to find the info of ip address you inputted |
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
// Returns an array of dates between the two dates | |
var getDates = function(startDate, endDate) { | |
var dates = [], | |
currentDate = startDate, | |
addDays = function(days) { | |
var date = new Date(this.valueOf()); | |
date.setDate(date.getDate() + days); | |
return date; | |
}; | |
while (currentDate <= endDate) { |
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 | |
# To clean all Docker containers, images and volumes | |
yes Y | docker rm -f $(docker ps -qa) | |
echo "docker rm -f $(docker ps -qa) was deleted!" | |
yes Y | docker rmi -f $(docker images -q) | |
echo "docker rmi -f $(docker images -q) was deleted!" |
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/sh | |
# When got this issue: This cluster is currently Provisioning; areas that interact directly with it will not be available until the API is ready. [controlPlane] Failed to bring up Control Plane: Failed to verify healthcheck: Service [kube-apiserver] is not healthy | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir |
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/sh | |
set -e | |
CHANNEL="stable" | |
docker_version=18.09.2 | |
apt_url="https://apt.dockerproject.org" | |
yum_url="https://yum.dockerproject.org" | |
gpg_fingerprint="9DC858229FC7DD38854AE2D88D81803C0EBFCD88" |
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/sh | |
set -e | |
# | |
# This script is meant for quick & easy install via: | |
# 'curl -sSL https://get.docker.com/ | sh' | |
# or: | |
# 'wget -qO- https://get.docker.com/ | sh' | |
# | |
# For test builds (ie. release candidates): | |
# 'curl -fsSL https://test.docker.com/ | sh' |