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 RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static | |
cargo build --release |
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 | |
[ -z "$1" ] && echo "Please provide a password" && exit 1 | |
[ "${#1}" -lt 8 ] && echo "Password length must greater then 8" && exit 2 | |
ADD_USER="<Please replace here>" | |
echo "Adding user $ADD_USER" | |
useradd $ADD_USER | |
echo "Succeed add user $ADD_USER" | |
echo -e "$1\n$1\n" | passwd --stdin $ADD_USER | |
echo "Changed $ADD_USER password" |
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 | |
[ -z "$1" ] && echo "Please provide DEV" && exit 1 | |
[ -z "$2" ] && echo "Please provide MTN" && exit 2 | |
DEV=$1 | |
MNT=$2 | |
PAR="${DEV}1" | |
printf """Partition~ | |
Will: | |
Init disk: \"$DEV\" | |
Create partition: \"$PAR\" |
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 | |
cd /usr/local/nginx/logs | |
PID=$(cat nginx.pid) | |
DATE=$(date +%Y%m%d) | |
LOG="access.log" | |
FILE="$LOG.$DATE" | |
GZ="${FILE}.gz" | |
echo "Working in $(pwd), PID: $PID" | |
[ -f $GZ ] && echo "\"$GZ\" already exists, skip." && exit 1 | |
mv $LOG $FILE |
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
$env:JAVA_OPTS = "-Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=7890" | |
.\gradlew.bat |
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
param( | |
[Switch] | |
$GetVersion, | |
$ReleaseVersion, | |
$NextVersion, | |
$Setting | |
) | |
function Start-Maven() | |
{ |
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
cd tomcat/lib | |
java -cp catalina.jar org.apache.catalina.util.ServerInfo |
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
/* From https://gist.github.com/JonasGao/500f61ed19a6a1232c8bc06cc63ddd02 */ | |
.menuBar { | |
background-color: #101010; | |
} | |
.menuBar-Btn_Icon { | |
fill: #ffffff !important; | |
} | |
.dictList { | |
padding-left: 15px; |
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
[CmdletBinding()] | |
param( | |
$Token, | |
$GitLab, | |
$Size = 10, | |
[Switch]$Dry = $False | |
) | |
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
$headers.Add("Private-Token", "$Token") | |
$has_groups = $True |
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 | |
PROF="$1" | |
OUT="$2" | |
SERVER="$3" | |
[ "$PROF" = "" ] && echo "Missing Parameter 1: Profile name" && exit 1 | |
[ "$OUT" = "" ] && OUT="${PROF}.yaml" | |
[ "$SERVER" = "" ] && SERVER="http://127.0.0.1:25500" | |
curl -vvo "$OUT" "${SERVER}/getprofile?name=profiles/${PROF}.ini&token=password&config=config/ACL4SSR_Online_Full.ini" |