Skip to content

Instantly share code, notes, and snippets.

View yangwe1's full-sized avatar

Wayne Yang yangwe1

View GitHub Profile
@yangwe1
yangwe1 / haproxy.cfg
Created October 31, 2019 03:47 — forked from techotaku/haproxy.cfg
HAProxy to Nginx (Web + V2Ray WebSocket) + OpenConnect + SSH + ShadowsocksR (TLS OBFS)
defaults
timeout connect 5s
timeout client 24h
timeout server 24h
global
log /dev/log local0
frontend ssl
log global
@yangwe1
yangwe1 / how-to-install-telegram-send
Created October 29, 2019 02:12 — forked from CHERTS/how-to-install-telegram-send
Fail2ban + Telegram using telegram-send
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.9 (jessie)
Release: 8.9
Codename: jessie
Installing telegram-send
# pip install telegram-send
https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt
XDG_RUNTIME_DIR=/run/user/1000; export XDG_RUNTIME_DIR
/usr/bin/mpg123 --list $HOME/list.lst -z
@yangwe1
yangwe1 / nginx.conf
Created December 29, 2015 08:09 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@yangwe1
yangwe1 / monaco_in_pycharm.md
Created December 26, 2015 14:15
往 pycharm 加字体

standard way of installing font like monaco: 将 Unicode Truetype 的 Monaco 字体复制到 /usr/share/fonts/truetype/ 目录下 然后sudo fc-cache -fv就可以在 pycharm 中看到这款字体

- function foo()
+ function bar()
@yangwe1
yangwe1 / add_swap_on_linux.md
Created October 10, 2015 07:04
add a swap file temporarily
sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

在VPS上执行完耗内存程序再关闭

sudo swapoff /swapfile
@yangwe1
yangwe1 / inspect installed softwares in deb.md
Created September 22, 2015 02:37
inspect installed softwares
dpkg -l | grep 'nginx'

or

sudo aptitude
@yangwe1
yangwe1 / polipo_set_up.md
Last active June 4, 2019 00:07
my polipo conf file

openwrt,用于缓存服务器 其web控制界面位于http://192.168.1.1:8123/polipo/

# polipo daemon configuration
config 'polipo' 'daemon'
	# daemonise polipo (fork in background)
	option 'daemonise' '1'
	# where polipo will store its process pid
	option 'pidFile' '/var/run/polipo.pid'