This file contains hidden or 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 | |
| # | |
| # Install python3 from source code on CentOS 7 | |
| # Maintainer: K8sCat <[email protected]> | |
| set -e | |
| if [[ $(id -u) -ne 0 ]]; then | |
| echo "require root" | |
| exit 1 | |
| fi | 
  
    
      This file contains hidden or 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
    
  
  
    
  | package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "os" | |
| "regexp" | 
  
    
      This file contains hidden or 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 | |
| # while :; do clear; your_command; sleep 2; done | |
| # usage: watch.sh "<your_command>" "<sleep_duration>" | |
| d=${2:-2} | |
| while :; do | |
| clear | |
| date | |
| $1 | |
| sleep ${d} | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # Maintainer: [email protected] | |
| import sys | |
| import time | |
| from datetime import datetime | |
| import ssl | |
| import socket | |
| def get_ssl_info(domain, port=443): | 
  
    
      This file contains hidden or 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
    
  
  
    
  | export const formatTime = (timestamp) => { | |
| const date = new Date(timestamp); | |
| const YY = date.getFullYear(); | |
| const MM = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1; | |
| const DD = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate(); | |
| const hh = date.getHours() < 10 ? `0${date.getHours()}` : date.getHours(); | |
| const mm = date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes(); | |
| const ss = date.getSeconds() < 10 ? `0${date.getSeconds()}` : date.getSeconds(); | |
| return `${YY}-${MM}-${DD} ${hh}:${mm}:${ss}`; | |
| }; | 
  
    
      This file contains hidden or 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 | |
| # | |
| # Pull K8S images | |
| # Version: 1.21.0 | |
| # Maintainer: [email protected] | |
| set -e | |
| # Pull images from aliyun registry | |
| kubeadm config images list | sed -e 's/^/docker pull /g' -e 's#k8s.gcr.io#registry.cn-shenzhen.aliyuncs.com/k8scat#g' -e 's#/coredns/coredns#/coredns#g' | sh -x | 
  
    
      This file contains hidden or 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 | |
| # | |
| # Install kubeadm, kubelet and kubectl | |
| # Maintainer: [email protected] | |
| set -e | |
| # 更新 apt 包索引并安装使用 Kubernetes apt 仓库所需要的包 | |
| apt-get update -y | |
| apt-get install -y apt-transport-https ca-certificates curl | 
  
    
      This file contains hidden or 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 | |
| # | |
| # Install Python3.8 and pip on Ubuntu 16 | |
| # Maintainer: [email protected] | |
| set -e | |
| add-apt-repository -y ppa:deadsnakes/ppa | |
| apt-get update -y | |
| apt-get install -y python3.8 python3.8-distutils | |
| curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | 
  
    
      This file contains hidden or 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 | |
| # | |
| # Install DockerCompose | |
| # Maintainer: [email protected] | |
| set -e | |
| #version=1.28.2 | |
| version=$1 | |
| curl -L "https://github.com/docker/compose/releases/download/${version}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| chmod +x /usr/local/bin/docker-compose | 
  
    
      This file contains hidden or 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 | |
| # | |
| # Install Docker on Ubuntu | |
| # Maintainer: [email protected] | |
| set -e | |
| # Uninstall old versions | |
| apt-get remove -y docker docker-engine docker.io containerd runc | |
| # SET UP THE REPOSITORY |