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 | |
set -e | |
VERSION=LATEST | |
#If you prefer a specific version you can set it specifically | |
#VERSION=7.66.0 | |
GPG_KEY_URL="https://daniel.haxx.se/mykey.asc" | |
GPG_KEY_PATH="/out/curl-gpg.pub" | |
#Do not escape the above variables in script below | |
#change last argument to -xeus for help with debugging |
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 | |
#============================================== | |
# Author: Ricky.K | |
# Description: Auto telnet and run command | |
#============================================== | |
echo "My own command..." && | |
(sleep 1; echo "user"; \ | |
sleep 1; echo "password"; \ | |
sleep 1; echo "cd /usr/local"; \ | |
sleep 1; echo "./test.sh"; \ |
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
obj-m := client_example.o | |
KDIR := /lib/modules/$(shell uname -r)/build | |
PWD := $(shell pwd) | |
default: | |
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules |
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 |
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
#!/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/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 | |
# 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
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
#-----------------------------------------------------------| | |
# 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 | |