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
wget https://github.com/shadowsocks/go-shadowsocks2/releases/download/v0.1.5/shadowsocks2-linux.tgz | |
tar xf shadowsocks2-linux.tgz | |
nohup sudo ./shadowsocks2-linux -s 'ss://AEAD_CHACHA20_POLY1305:uI9xS7cO4xB0mY5vD2tJ@: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
#!/usr/bin/sh | |
if test $# -ne 1; then | |
echo "Usage: `basename $0 .sh` <process-id>" 1>&2 | |
exit 1 | |
fi | |
if test ! -r /proc/$1; then | |
echo "Process $1 not found." 1>&2 | |
exit 1 |
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 ( | |
"github.com/nacos-group/nacos-sdk-go/v2/clients" | |
"github.com/nacos-group/nacos-sdk-go/v2/common/constant" | |
"github.com/nacos-group/nacos-sdk-go/v2/vo" |
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
#-----------------------------------------------------------| | |
# INTERFACE SETTINGS | |
# ================== | |
# Please understand these before changing them. | |
#-----------------------------------------------------------| | |
#load irc and ftp conntrack helpers if they exist | |
/sbin/modprobe ip_conntrack_irc &>/dev/null | |
/sbin/modprobe ip_conntrack_ftp &>/dev/null | |
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
import ( | |
"net/http" | |
_ "net/http/pprof" | |
) | |
func main() { | |
go http.ListenAndServe("0.0.0.0:6001", nil) | |
/* | |
业务代码 |
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 | |
# Set the color variable | |
green='\033[0;32m' | |
# Clear the color after that | |
clear='\033[0m' | |
printf "The script was executed ${green}successfully${clear}!" |
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 | |
# crictl -r unix:///run/containerd/containerd.sock pods | |
# kubectl get pod kata-1 -o jsonpath='{$.status.containerStatuses[0].containerID}' | |
# pod id = containerID of pause | |
# full-id: ctr -n k8s.io c ls | |
# pod_ip=172.16.102.68; for ns in $(ip netns ls | cut -f 1 -d " "); do ip netns exec $ns ip a | grep -q $pod_ip; status=$?; [ $status -eq 0 ] && echo "pod namespace: $ns" ; done | |
# TODO |
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 | |
while getopts n:c: option | |
do | |
case "${option}" | |
in | |
n)nation=${OPTARG};; | |
c)code=${OPTARG};; | |
esac | |
done |
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 | |
export PATH='/etc/storage/bin:/tmp/script:/etc/storage/script:/opt/usr/sbin:/opt/usr/bin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin' | |
sleep 3 | |
ip=`curl -SsL http://cip.cc/ | head -1 | awk '{print $3}'` | |
echo $ip | curl -F 'f:1=<-' -F 'id:1=4ATA' fjrti:[email protected] | |
new_ip=$ip | |
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
# install chocolatey | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
# install visual studio 2019 | |
choco install -y visualstudio2019community | |
choco install -y visualstudio2019buildtools | |
choco install -y visualstudio2019-workload-manageddesktop | |
choco install -y visualstudio2019-workload-vctools | |
# install rustup |
NewerOlder