参考 https://teddysun.com/358.html
vim /etc/shadowsocks-libev/redir.json
{
参考 https://teddysun.com/358.html
vim /etc/shadowsocks-libev/redir.json
{
Regions for aws | |
* eu-west-2 | |
* ap-south-1 | |
* us-east-2 | |
* ap-northeast-2 | |
* us-west-2 | |
* ap-southeast-2 | |
* eu-central-1 | |
* eu-west-1 | |
* ca-central-1 |
#!/usr/bin/env bash | |
printf "\nattempt to renew certificates at " >>/var/log/certbot_cron.log 2>&1 | |
date >>/var/log/certbot_cron.log 2>&1 | |
certbot renew --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" --standalone-supported-challenges http-01 >>/var/log/certbot_cron.log 2>&1 | |
printf "renew finished\n" >>/var/log/certbot_cron.log 2>&1 |
char *dup = strdup(str.c_str()); | |
for (char *token = strtok(dup, " ,;"); token != NULL; token = strtok(NULL, " ,;")) { | |
// do something with token | |
} | |
free(dup); |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.ArrayBlockingQueue; | |
import java.util.concurrent.BlockingQueue; | |
public class TestArrayBlockingQueuePerf { | |
private static final int CHANNEL_NUM = 8; | |
private static final int CHANNEL_BUFFER_SIZE = 65536; |
import akka.actor._ | |
import akka.pattern.ask | |
import scala.collection.mutable | |
import scala.concurrent.Await | |
import scala.concurrent.duration._ | |
case class AddCount(word: String) | |
case class ReportCount(word: String) | |
class WordCountActor extends Actor { |
2018/07/26-10:37:02.433656 700001119000 RocksDB version: 5.14.2 | |
2018/07/26-10:37:02.433730 700001119000 Git sha rocksdb_build_git_sha:5089e121166c46956a8a21c8ef967f1896c239de | |
2018/07/26-10:37:02.433733 700001119000 Compile date Jul 6 2018 | |
2018/07/26-10:37:02.433735 700001119000 DB SUMMARY | |
2018/07/26-10:37:02.433781 700001119000 SST files in /Users/eric/Desktop/RocksDBTest dir, Total Num: 0, files: | |
2018/07/26-10:37:02.433784 700001119000 Write Ahead Log file in /Users/eric/Desktop/RocksDBTest: | |
2018/07/26-10:37:02.433786 700001119000 Options.error_if_exists: 0 | |
2018/07/26-10:37:02.433790 700001119000 Options.create_if_missing: 1 | |
2018/07/26-10:37:02.433791 700001119000 Options.paranoid_checks: 1 | |
2018/07/26-10:37:02.433792 700001119000 Options.env: 0x1157c4a18 |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
# Rewrite HTTPs request headers to add "X-Real-IP: <Any-IP-Addr-From-CN>" | |
# You may need: https://lite.ip2location.com/china-ip-address-ranges | |
[rewrite_local] | |
^https?://(\w+\.)?music\.163\.com/.* url request-header (\r\n)User-Agent: request-header $1X-Real-IP: 111.72.0.1$1User-Agent: | |
# MITM is required to decrypt the HTTPs traffics of Netease Music App | |
[mitm] | |
hostname = *.music.126.net, *.music.163.com |