View VagrantFile
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
View .tmux.conf.local
# : << EOF | |
# https://github.com/gpakosz/.tmux | |
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, | |
# without any warranty. | |
# Copyright 2012— Gregory Pakosz (@gpakosz). | |
# -- navigation ---------------------------------------------------------------- | |
# if you're running tmux within iTerm2 |
View config.yml
#---------------------------------------------------# | |
## 配置文件需要放置在 $HOME/.config/clash/config.yml | |
## | |
## 如果您不知道如何操作,请参阅 SS-Rule-Snippet 的 Wiki: | |
## https://github.com/Hackl0us/SS-Rule-Snippet/wiki/clash(X) | |
#---------------------------------------------------# | |
# HTTP 代理端口 | |
port: 7890 |
View fibo.c
int fibo(int); | |
int fibo(int N) { | |
if (0 == N) return 0; | |
if (1 == N || 2 == N) return 1; | |
int pre = 1, cur = 1; | |
for (int i = 3; i <= N; ++i) { | |
int sum = pre + cur; | |
pre = cur; | |
cur = sum; | |
} |
View merge_dicts.py
# delcare two dicts with x and y | |
x = dict(a=1, b=2) | |
y = dict(b=2, c=5) | |
## in python 3.5+ ## | |
z = { **x, **y} # z = {'a': 1, 'b': 2, 'c': 5} | |
## in python 2.x ## |