Skip to content

Instantly share code, notes, and snippets.

@chen206
chen206 / git.md
Last active December 19, 2015 08:19
git, 分布式

git config

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

共享设置

添加一个用户账号:git:123456

将atweiquan工程的父级目录共享,比如D:\work\atweiquan,将work共享

@chen206
chen206 / tornado-server.md
Last active February 19, 2017 12:31
tornado server, ubuntu 12.04.2, mysql5.5, python2.7, tornado2.4.1, virtualenv, celery3.0.19, redis2.7.4, mongo

AptGet source.list

/etc/apt/source.list

deb http://cn.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise main restricted

deb http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted
@chen206
chen206 / mac os x.md
Last active October 13, 2015 01:18
os x, maverick

~/Library/Application Support/SIMBL/Plugins/TerminalColours-SL-64bit.bundle/Contents/Info.plist

Change MaxBundleVersion

sudo killall -HUP mDNSResponder
1. 编辑NERD_tree.vim,
2. 找到 call s:initVariable("g:NERDTreeDirArrows", !s:running_windows)
3. 把那个"!"去掉
Make sure that PuTTY is set for UTF-8 as well. You can do this under Window -> Translation -> Remote Character Set. You may need to choose a font that supports a reasonable portion of the Unicode range as well -- Terminal isn't necessarily going to cut it.
@chen206
chen206 / gist:4083275
Created November 16, 2012 02:05
python snippets
>>> t = ((1, 'a'),(2, 'b'))
>>> dict((y, x) for x, y in t)
{'a': 1, 'b': 2}
>>> [1] * 5
[1, 1, 1, 1, 1]
>>> ['%s'] * 5
['%s', '%s', '%s', '%s', '%s']
@chen206
chen206 / gist:4030441
Created November 7, 2012 09:45
Install Postgresql 9.2 on Ubuntu 12.04
#!/bin/bash
#
# Install Postgres 9.2 on a clean Ubuntu 12.04
"""
LC_ALL issue
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file.