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
# https://github.com/iMeiji/shadowsocks_install/wiki/开启TCP-BBR拥塞控制算法 | |
https://www.vultr.com/docs/how-to-deploy-google-bbr-on-centos-7 |
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
#ref = https://docs.docker.com/install/linux/docker-ce/debian/#set-up-the-repository | |
#Uninstall old versions | |
apt-get remove docker docker-engine docker.io | |
#Install using the repository | |
apt-get update | |
#Install packages to allow apt to use a repository over HTTPS | |
apt-get install \ | |
apt-transport-https \ |
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 | |
SS_PORT=#port | |
SS_PASSWD=#passwd | |
docker run -dt --name ss \ | |
-p ${SS_PORT}:${SS_PORT} mritd/shadowsocks \ | |
-s "-s 0.0.0.0 -p ${SS_PORT} -m aes-256-cfb -k ${SS_PASSWD} --fast-open" |
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
#ref = https://github.com/txthinking/brook/wiki/How-to-run-Brook-Server-on-Linux%3F | |
#Download brook | |
wget [Brook Server for Linux] | |
#Make brook executable | |
chmod +x brook | |
#Run brook | |
#Start brook | |
./brook server -l :9999 -p [password] | |
#Stop brook: press Control + C | |
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
#Check available time zones | |
tzselect | |
# add "export TZ='Asia/Shanghai'" to '/etc/profile' | |
#update profile | |
source /etc/profile |
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
# pull image | |
docker pull redis | |
# run image | |
docker run -d -p 6380:6379 --name=myredis redis | |
# enter into container | |
docker exec -it myredis /bin/bash | |
docker run --privileged=true -p 6380:6379 -v /usr/local/etc/redis/redis.conf:/usr/local/etc/redis/redis.conf --name myredis2 -d redis | |
redis-server /usr/local/etc/redis/redis.conf |
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
docker run -d --name myactivemq -p 61617:61616 -p 8162:8161 webcenter/activemq |
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
docker run --name mysql1 -p 3307:3306 -e MYSQL_ROOT_PASSWORD=[passwd] -d akoller/low-memory-mysql:latest |
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 with brew | |
#Use brew to install the nginx with command: | |
brew install nginx | |
#After install run: | |
sudo nginx | |
#Testing | |
#Open Navigator it by going to URL: |
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
# 枚举实现 | |
/** | |
* Enum based singleton implementation. Effective Java 2nd Edition (Joshua Bloch) p. 18 | |
* | |
* This implementation is thread safe, however adding any other method and its thread safety | |
* is developers responsibility. | |
*/ | |
public enum EnumIvoryTower { | |
INSTANCE; |
OlderNewer