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 | |
# 改变当前git库所有分支git 历史提交人的信息 | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" |
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 -oe | |
# FIXME: | |
#================================================== | |
# NOTE: | |
# 运行脚本之前,先给当前用户不要输入密码的权限 | |
# 运行如下命令: | |
# $ sudo sed -i 's/%sudo ALL=(ALL) ALL/%sudo ALL=(ALL) NOPASSWD:ALL/' /etc/sudoers | |
#================================================== |
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 | |
#============================================================================ | |
# Run below command for the first time | |
#============================================================================ | |
cat<< EOF | |
# install tools | |
sudo apt-get install debmirror | |
# Set up keyring to correctly verify Release signatures |
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 | |
# install tools | |
# sudo apt-get install debmirror | |
LOG_DIR="/disk_3T/debian_mirrors/log" | |
LOG="$LOG_DIR/$(date '+%F.%T').txt" | |
test -d $LOG_DIR || mkdir -p $LOG_DIR | |
# save mirror log |
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
#!/usr/bin/env bash | |
# 配置参考: | |
# https://github.com/shadowsocks/shadowsocks-libev/blob/master/docker/alpine/README.md | |
# 密码 | |
PASSWORD="your_password" | |
# 绑定到主机的端口号 | |
SERVER_PORT=8388 | |
# 加密方式 |
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
#!/usr/bin/env bash | |
# please run as root user | |
# install docker | |
apt-get remove docker docker-engine docker.io | |
apt-get update | |
apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ |
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
#!/usr/bin/env bash | |
# 配置参考: | |
# https://github.com/shadowsocks/shadowsocks-libev/blob/master/docker/alpine/README.md | |
SERVER_ADDR="your_server_ip" | |
SERVER_PORT="your_server_port" | |
PASSWORD="your_password" | |
METHOD="aes-256-cfb" | |
TIMEOUT=300 |
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
#!/usr/bin/env bash | |
SERVER_ADDR="your_server_ip" | |
SERVER_PORT="your_server_port" | |
PASSWORD="your_password" | |
METHOD="your_encrption_method" | |
TIMEOUT=300 | |
# socket5 协议端口1080 | |
LOCAL_SCOKET_PORT=1080 |
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
package com.example.anroid.testaescipher; | |
import android.util.Base64; | |
import java.io.UnsupportedEncodingException; | |
import java.security.InvalidAlgorithmParameterException; | |
import java.security.InvalidKeyException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.SecureRandom; |
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
service_account_name="jenkins" # service account name, for example: jenkins | |
namespace="default" # service account namespace, for example: default | |
cluster_name="kubernetes" | |
server="https://kubernetes.default.svc.cluster.local" | |
ca_file="ca.crt" | |
kube_config_file="$service_account_name.conf" | |
token_name=$(kubectl get serviceaccount $service_account_name -n $namespace -o jsonpath="{.secrets[0].name}") | |
token=$(kubectl get secret $token_name -n $namespace -o jsonpath="{.data.token}" | base64 -D) | |
kubectl get secret $token_name -n $namespace -o jsonpath="{.data.ca\.crt}" | base64 -D > $ca_file |