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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
dns = 8.8.8.8 | |
max-clients = 0 | |
max-same-clients = 5 | |
route = 172.68.2.0/255.255.255.0 | |
route = 3.0.0.0/255.0.0.0 | |
route = 4.0.0.0/255.0.0.0 | |
route = 8.0.0.0/255.0.0.0 | |
route = 17.0.0.0/255.0.0.0 | |
route = 198.0.0.0/255.0.0.0 |
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
local 192.168.1.101 #这里替换成你的vps的IP# | |
port 10037 #相应的端口 | |
proto udp | |
dev tun | |
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt | |
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt | |
key /etc/openvpn/easy-rsa/2.0/keys/server.key | |
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem | |
ifconfig-pool-persist ipp.txt |
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
" atd 英语语法检查 https://bitbucket.org/shellexy/my-bin-script/src/tip/atd_grammar_checking.py | |
function! Atd_grammar_checking() | |
browse confirm up | |
let makeprg_=&makeprg | |
set makeprg=atd_grammar_checking.py\ % | |
silent make | |
copen | |
let &makeprg=makeprg_ | |
endfunction | |
map <F6> <ESC>:call Atd_grammar_checking()<CR> |
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
" 用 Alt+左右方向键 来切换多文件 | |
map <silent><A-Right> :bn<CR> | |
map <silent><A-Left> :bp<CR> | |
"要在命令行上实现 Emacs 风格的编辑操作: > | |
" 至行首 | |
cnoremap <C-A> <Home> | |
" 后退一个字符 | |
cnoremap <C-B> <Left> | |
" 删除光标所在的字符 |
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
#ubuntu #apt 一行命令里同时安装删除多个软件 | |
$ sudo apt install xxx yyy ooo- zzz- | |
会安装 xxx、yyy 并删除 ooo、zzz | |
+ 表示安装 | |
+M 表示这次是因为别的包依赖而安装的,在将来没有其他包依赖他时会自动删除 | |
- 删除 | |
_ 彻底删除 | |
= 固定版本 |
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
修改 wifi 验证服务器地址 | |
安卓 5.0~6.0 可以 | |
adb shell settings put global captive_portal_server google.cn | |
安卓 7.0~7.1 同上并需要服务器支持 https | |
安卓 7.1.1 可以 | |
adb shell settings put global captive_portal_https_url https://google.cn/generate_204 | |
上述 google.cn 可以也换成 www.qualcomm.cn 高通中国的验证服务器 |
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
diff --git a/winetricks-zh b/winetricks-zh | |
--- a/winetricks-zh | |
+++ b/winetricks-zh | |
@@ -9857,6 +9857,20 @@ w_metadata fakechinese fonts \ | |
load_fakechinese() | |
{ | |
+ fc-list | grep -q "Noto Sans CJK SC Thin" && { | |
+ w_register_font_replacement "Microsoft JhengHei" "Noto Sans CJK SC Thin" | |
+ w_register_font_replacement "Microsoft YaHei" "Noto Sans CJK SC Thin" |
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
配置 | |
安装:: | |
sudo aptitude install openvpn udev lzop easy-rsa | |
生成 CA 证书:: | |
sudo su | |
make-cadir /etc/openvpn/easy-rsa/2.0 |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# wol.py 远程唤醒计算机 | |
# 参见 http://code.activestate.com/recipes/358449-wake-on-lan/ | |
# https://github.com/bentasker/Wake-On-Lan-Python | |
# 原作者 Fadly Tabrani, B Tasker,协议 PSF | |
## 可以改为自己需要远程唤醒的计算机的 MAC 地址 | |
MACADDRESS = '00:13:0d:e4:60:61' |