Skip to content

Instantly share code, notes, and snippets.

View XiaochenCui's full-sized avatar
🌴
On vacation

Xiaochen Cui XiaochenCui

🌴
On vacation
View GitHub Profile
@XiaochenCui
XiaochenCui / dev_manual.md
Last active June 28, 2016 13:13
算法提交平台的测试文档(http://121.42.62.137:8081)
@XiaochenCui
XiaochenCui / .gitconfig
Created August 19, 2016 04:55 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
# -*- coding: utf-8 -*-
from twisted.internet.task import LoopingCall
class Countdown(object):
_instances = set()
def __init__(self, count_to):
self.counter = count_to
@XiaochenCui
XiaochenCui / tmux-cheatsheet.markdown
Last active November 12, 2019 02:00 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@XiaochenCui
XiaochenCui / git-cheatsheet.md
Last active September 3, 2017 11:41
git cheatsheet

git-cheatsheet

Command

diff

  • git diff

    显示仍留在工作目录中且未暂存的变更

@XiaochenCui
XiaochenCui / rabbitmq-cheatsheet.md
Last active January 3, 2017 08:57
rabbitmq cheatsheet

rabbitmq-cheatsheet

rabbitmqctl

vhost

  • rabbitmqctl add_vhost [vhost_name]

  • rabbitmqctl delete_vhost [vhost_name]

@XiaochenCui
XiaochenCui / command-cheatsheet.md
Last active January 4, 2017 05:11
shell command cheatsheet
  • du -hs /path/to/directory

    summarizes disk usage of a directory

  • lsb_release -a

    check ubuntu version

  • sudo /etc/init.d/nscd restart

@XiaochenCui
XiaochenCui / .gitconfig
Last active January 4, 2017 05:17
xiaochen's git global config
[user]
name = XiaochenCui
email = jcnlcxc@163.com
[push]
default = simple
[credential]
helper = store
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
co = checkout

vim 中需要转义才能生效的 meta characters

  • ()
  • +

look around

meaning perl vim remark
Matches the preceding atom with zero width (?=pattern) @=
#!/usr/bin/env python
# encoding: utf-8
"""
@version: 1.0
@author: Mark Tao
@contact: urtop@qq.com
@file: multi_download.py
@time: 2015/11/1 19:55
"""
from multiprocessing.dummy import Pool as ThreadPool