Skip to content

Instantly share code, notes, and snippets.

View zilongshanren's full-sized avatar
🎯
Focusing

子龙山人 zilongshanren

🎯
Focusing
View GitHub Profile
@zilongshanren
zilongshanren / VS2010 vim config
Last active December 27, 2015 03:39
vs 2010 vim config
nmap <C-O> :vsc View.NavigateBackward<CR>
nmap <C-I> :vsc View.NavigateForward<CR>
nmap <C-]> :vsc Edit.GoToDefinition<CR>
set incsearch
set hlsearch
set number
imap <c-n> <Down>
@zilongshanren
zilongshanren / anchor-in-markdown
Last active December 30, 2015 02:59 — forked from asabaylus/gist:3071099
Github heading anchor
# Anchors in Markdown
### My Heading
This is a [anchor](#my-heading).
@zilongshanren
zilongshanren / commit-msg
Last active December 31, 2015 14:18
force adding (issue #digit or fixed #digit) into commit message
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file)
#starts with # then number, space, and at least 5 words no more than 200
$regex = /(fixed #(\d+)|issue #(\d+))/
if !$regex.match(message)

Markup Cheat sheet for Org-mode

Heading 1

Heading 2: Set a deadline and a schedule

[66%] Heading 3: a list with checkboxes

  1. [X] task 1
  2. [X] task 2
  3. [ ] task 3
function addBlankTargetForLinks () {
$('a[href^="http"]').each(function(){
$(this).attr('target', '_blank');
});
}
$(document).bind('DOMNodeInserted', function(event) {
addBlankTargetForLinks();
});
@zilongshanren
zilongshanren / manual lua bindings
Last active May 12, 2016 12:48 — forked from kizzx2/fun.cpp
a demo show how to bind class to lua manually
// fun.cpp
extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}
#include <iostream>

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@zilongshanren
zilongshanren / install pandoc on mac
Last active August 29, 2015 13:56 — forked from schmurfy/gist:3199254
在mac上面安装pandoc
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
# Install pandoc view homebrew
$ brew install haskell-platform
$ cabal install pandoc
@zilongshanren
zilongshanren / ubuntu12.04首次使用配置
Last active August 29, 2015 13:56
ubuntu desktop 版本首次安装完之后的配置
1. 更新软件源
http://blog.ubuntusoft.com/ubuntu-update-source.html
2.安装五笔输入法
http://blog.chinaunix.net/uid-25498312-id-3580448.html
3.安装zsh
https://gist.github.com/tsabat/1498393
@zilongshanren
zilongshanren / debian+wordpress
Last active August 29, 2015 13:56
在debian系统上面配置mysql + wordpress + ngix
参考贴子:
-https://www.digitalocean.com/community/articles/how-to-install-wordpress-with-nginx-on-ubuntu-12-04
-https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04
最好是用ubuntu 12-04.如果不行,debian 6.06也是可以的。
注意用ip地址去访问。用没有备案的域名是行不通滴。。。