Skip to content

Instantly share code, notes, and snippets.

@xionglikarl
xionglikarl / msg_queue.erl
Last active February 19, 2017 15:28
lua fixed size circular queue && erl fixed size msg queue
-module(msg_queue).
-include_lib("stdlib/include/assert.hrl").
-compile(export_all).
new(Size) ->
Q = queue:new(),
put(q_maxsize, Size),
put(q_size, 0),
Q.
-module(buf).
-compile(export_all).
test() ->
B = buf:new(),
List = lists:seq(1, 1000),
List2 = lists:seq(901, 1000),
B2 =
lists:foldl(
fun(Ele, Acc) ->
[user]
name = xionglikarl
email = [email protected]
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
set shiftwidth=4
set tabstop=4
set expandtab
set autoindent
set number
"set relativenumber
set hlsearch
@xionglikarl
xionglikarl / tmux常用命令
Last active March 28, 2017 07:37
tmux常用命令
prefix = ctrl+b
prefix + c 新建窗口
prefix + , 重命名窗口
prefix + p 切换窗口
prefix + <WindowNum> 切换窗口
prefix + & 关闭窗口
prefix + % 纵向拆分窗口
prefix + " 横向拆分窗口
prefix + o 切换窗格
prefix + x 关闭窗格
@xionglikarl
xionglikarl / git常用命令
Last active August 28, 2016 05:59
git常用命令
git常用命令:
git clone [email protected]:<acc>/<projcet.git>
git add file1
git commit -m'what'
git diff file1 比较文件与版本库的区别
git status
git log
git log --pretty=oneline --abbrev-commit
git reset --hard {Rev} 回退版本
git reflog 查看历史操作