- YAML 使用 2 空格+.yml后缀
- Jinja 变量前后需要使用空格 {{ var }}
- YAML 中引用变量时需要用双引号
- 环境变量全大写,其他变量全小写
- 所有变量前需要加上 role name 作为前缀,比如 nginx_xxx
- role 命名使用短横线
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 python | |
# -*- coding: utf-8 -*- | |
import sys | |
import requests | |
import Foundation | |
import objc | |
import logging | |
from time import sleep |
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
[General] | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114 | |
loglevel = info | |
[Proxy] | |
Proxy = http, 192.168.1.76, 8888 | |
[Rule] |
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 sh | |
if [ -f $HOME/.vimrc ]; then | |
echo "Backup .vimrc" | |
mv $HOME/.vimrc $HOME/.vimrc.backup | |
fi | |
curl -s https://raw.github.com/gist/4162331/.vimrc -L > $HOME/.vimrc | |
if [ -f $HOME/.bashrc ]; then | |
echo "Backup .vimrc" |
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
syntax enable | |
filetype plugin indent on | |
set bg=dark | |
" Stop backup files | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
" better search |