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 | |
date >> /tmp/trojan.log | |
echo "check trojan status" >> /tmp/trojan.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
#!/bin/bash | |
# Prepare | |
export PATH=$PATH:/usr/local/phabricator/arcanist/bin | |
PHID=$1 | |
DIFF_ID=$2 | |
REVISION_ID=$3 | |
TOKEN=YOUR_TOKEN_HERE |
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 | |
grubby --args="namespace.unpriv_enable=1 user_namespace.enable=1" --update-kernel="$(grubby --default-kernel)" | |
echo "user.max_user_namespaces=15000" >> /etc/sysctl.conf | |
useradd hpc | |
usermod -u 666 hpc | |
groupmod -g 666 hpc | |
echo "hpc:666:1" > /etc/subuid |
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
# ncurses and libevent | |
yum install ncurses libevent-devel -y | |
# tmux | |
git clone https://github.com/tmux/tmux.git | |
cd tmux | |
sh autogen.sh | |
./configure && make -j8 | |
sudo make install |
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/sh | |
# create self-signed server certificate: | |
read -p "Enter your domain [www.example.com]: " DOMAIN | |
echo "Create server key..." | |
openssl genrsa -des3 -out $DOMAIN.key 1024 |
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
listen=:1087 | |
forward=socks5://127.0.0.1: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
#!/usr/bin/env bash | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
#=================================================================# | |
# System Required: CentOS, Debian, Ubuntu # | |
# Description: One click Install Shadowsocks-go server # | |
# Author: Teddysun <i@teddysun.com> # | |
# Thanks: @cyfdecyf <https://twitter.com/cyfdecyf> # | |
# Intro: https://teddysun.com/392.html # | |
#================================================================== |
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 | |
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS | |
# This script will work on Debian, Ubuntu, CentOS and probably other distros | |
# of the same families, although no support is offered for them. It isn't | |
# bulletproof but it will probably work if you simply want to setup a VPN on | |
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and | |
# universal as possible. | |
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
function parseURI(url) { | |
var m = String(url).replace(/^\s+|\s+$/g, '').match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); | |
// authority = '//' + user + ':' + pass '@' + hostname + ':' port | |
return (m ? { | |
href: m[0] || '', | |
protocol: m[1] || '', | |
authority: m[2] || '', | |
host: m[3] || '', | |
hostname: m[4] || '', | |
port: m[5] || '', |