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 | |
| # Usage: kproxy [-A] servicename [localport] | |
| # Parse command line arguments | |
| if [[ "$1" == "-A" ]]; then | |
| all_namespaces=true | |
| shift | |
| else | |
| all_namespaces=false |
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
| function awsctx(){ | |
| local profile_name=${1:-default} | |
| sed -i "/^alias aws='aws --profile/d" ${HOME}/.bashrc | |
| alias aws="aws --profile $profile_name" | |
| echo "alias aws='aws --profile $profile_name'" >> ${HOME}/.bashrc | |
| } |
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
| map $http_upgrade $connection_upgrade { | |
| default keep-alive; | |
| 'websocket' upgrade; | |
| '' close; | |
| } | |
| server { | |
| listen 80; | |
| listen [::]:80; |
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 | |
| echo_status(){ | |
| TEXT=$1 | |
| echo "\n $(tput setaf 1)>>>> $(tput setab 7) $TEXT $(tput sgr 0)" | |
| } | |
| SOKSPROXY_PASS=$(openssl rand -base64 12) | |
| echo_status "Updating System and installing dante-server" |
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
| #!/usr/bin/env bash | |
| # 备份下现有的kubectl config 文件 | |
| suffix="bak$(date +"%Y%m%d")" | |
| cp ~/.kube/config "~/.kube/config.${suffix}" | |
| newPath=${1:-/path/to/new/config} | |
| # 将2份kubectl config 文件合并成一份 | |
| KUBECONFIG=~/.kube/config:$newPath kubectl config view --flatten >/tmp/config # Replace your old config with the new merged config |
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 | |
| FRP_VERSION="0.44.0" | |
| arch=$(uname -i) | |
| if [[ $arch == x86_64* ]]; then | |
| echo "X64 Architecture" | |
| elif [[ $arch == i*86 ]]; then | |
| echo "X32 Architecture" | |
| elif [[ $arch == arm* ]] || [[ $arch = aarch64 ]]; then |
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 | |
| FRP_VERSION="0.44.0" | |
| arch=$(uname -i) | |
| if [[ $arch == x86_64* ]]; then | |
| echo "X64 Architecture" | |
| elif [[ $arch == i*86 ]]; then | |
| echo "X32 Architecture" | |
| elif [[ $arch == arm* ]] || [[ $arch = aarch64 ]]; then |
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
| sudo openvpn --verb 4 lenovo-vpn \ | |
| --config /etc/openvpn/client.ovpn \ | |
| --auth-user-pass /etc/openvpn/passwd |