Skip to content

Instantly share code, notes, and snippets.

View aispin's full-sized avatar

Livin AI aispin

View GitHub Profile
@aispin
aispin / svn-ignore-pattern
Created July 9, 2014 02:30
svn ignore pattern
*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp *[Bb]in *obj *suo *resharp* *.user *.tmp *.TMP *Resharper* *ReSharper* *.Load *.gpState *.NoLoad *.~m2 *.dbmdl *.gpState _notes *.cache [Tt]est[Rr]esult [Bb]uild[Ll]og.* *.[Pp]ublish.xml *.[Cc]ache [Tt]humbs.db lint.db *.docstates .apdisk [Ll]ogs .DS_Store
## .gitconfig
[alias]
dt = difftool
mt = mergetool
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
@aispin
aispin / xhogan-demo.js
Last active August 29, 2015 14:02
API of xhogan.js
/**
* 将指定数据渲染指定模板
* @param {Object} opts 配置对象
* @param {String} opts.target 渲染目标的css选择器,例如#test
* @param {String} opts.tpl 模板的id选择器或者模板的内容(支持远程模板文件例如http://faso.me/xhogan/tpl/test.html)。如果是模板id,需要以#开始,例如#tpl1
* @param {String} opts.data 渲染模板所需数据,json对象或者远程json文件例如http://faso.me/xhogan/data/test.json
* @param {String} opts.tplVersion 模板版本号
* @param {String} opts.dataVersion 数据版本号
* @param {String} opts.appendToTarget 是否将最后的dom追加到目标元素中
* @param {Object} opts.extraTplData 模板渲染的额外数据
@aispin
aispin / sgz-misc.json
Last active August 29, 2015 14:02
newslist data dictionary for sgz.qq.com app
/* 首页分类+快捷入口+百宝箱数据 */
{
//首页分类
"cates":[
{
"id":"分类ID",
"name":"分类名称"
}
],
//快捷入口 - 更多
@aispin
aispin / github-remove-submodule
Last active October 30, 2015 17:14 — forked from kyleturner/Remove Submodule
how to remove a git submodule
To remove a submodule you need to:
1.Delete the relevant section from the .gitmodules file.
2.Stage the .gitmodules changes git add .gitmodules
3.Delete the relevant section from .git/config.
4.Run git rm --cached path_to_submodule (no trailing slash).
5.Run rm -rf .git/modules/path_to_submodule
6.Commit git commit -m "Removed submodule <name>"
7.Delete the now untracked submodule files
rm -rf path_to_submodule
@aispin
aispin / github-submodule.sh
Last active August 29, 2015 13:58 — forked from necolas/gist:2215692
github submodule
# Workflow from https://github.com/necolas/dotfiles
# Add the new submodule
git submodule add git://example.com/remote/path/to/repo.git vim/bundle/one-submodule
# Initialize the submodule
git submodule init
# Clone the submodule
git submodule update
# Stage the changes
git add vim/bundle/one-submodule
You can change the default company information as below:
1, run "regedit" at the command prompt, open the regeditor
2, Find the path: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion
3, Find the key: RegisteredOrganization, right click "Modify"
4, input your lovely new company name,done!
@aispin
aispin / bash-dircolors-monokai
Last active November 17, 2018 10:15
bash console color configurations
# vim: set filetype=bash :
# Install: `ln -s ~/.bash/dircolors ~/.dircolors`
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
@aispin
aispin / git-bash-ls-chinese-sucks
Created March 18, 2014 06:52
git bash ls命令显示中文乱码的解决办法
git bash ls命令显示中文乱码,
1,在根目录下c:\Users\xxx 下面新建一个.bashrc文件和.bash_aliases文件
2,打开bashrc文件里面加入~/.bash_aliases
3,在bash_aliases文件中加入alias ls='ls --show-control-chars --color=auto'