`
luozhaoyu
  • 浏览: 343507 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
收藏列表
标题 标签 来源
mysql.cnf http://dev.mysql.com/doc/refman/5.1/en/index.html
# reserve some connections for root user
max_connections = 2000
max_user_connections = 1980

# buffers
# block buffers where the most-used index blocks are placed
key_buffer_size = 384M
# select statement query result cache
query_cache_size = 32M

# best as private ip
server-id = 19216801


# replication info
relay-log-info-file
master-info-file
relay-log = bestashostname-relay-bin
snipmate python snippets
snippet ##
	# -*- coding: utf-8 -*-
	"""
		${1:`Filename('$1.py', 'foo.py')`}
		~~~~~~~~~~~~~~

		${2:A brief description goes here.}

		:copyright: (c) 2012 by leon.
		:license: MIT, see LICENSE for more details.
	"""


	def _main(argv):
		${3}


	if __name__ == '__main__':
		import sys
		_main(sys.argv)
MIT License MIT License
Copyright (C) <${year}> <COPYRIGHT HOLDERS>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
eclipse的头注释文件 The Pocoo Style Guide
# -*- coding: utf-8 -*-
"""
    ${module}
    ~~~~~~~~~~~~~~

    A brief description goes here.

    :copyright: (c) ${year} by ${user}.
    :license: LICENSE_NAME, see LICENSE for more details.
"""
${cursor}
debian源设置 apt-get
# /etc/apt/sources.list
deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official amd64 CD Binary-1 20111008-14:36]/ squeeze main
#163 mirror
# deb表示二进制包
deb http://mirrors.163.com/debian squeeze main non-free contrib
deb http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security squeeze/updates main contrib non-free-

# deb表示源码包
deb-src http://mirrors.163.com/debian squeeze main non-free contrib
deb-src http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian-security squeeze/updates main contrib non-free-

deb http://security.debian.org squeeze/updates main contrib non-free
kbs-CentOS yum http://www.centos.org/docs/5/html/yum/sn-using-repositories.html
# All new packages are now released to the testing repository first
# and only moved into Stable after a period of time
# Note: The testing repository is disabled by default

[kbs-CentOS-Extras]
name=CentOS.Karan.Org-EL$releasever - Stable
gpgcheck=1
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=1
baseurl=http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/

# pkgs in the -Testing repo are not gpg signed
[kbs-CentOS-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
gpgcheck=0
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=0
baseurl=http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/
.bashrc设置 alias
# vim /etc/bash.bashrc ~/.bash_aliases

alias difff='diff -bBy --suppress-common'
alias duh1='du -h --max-depth=1'
alias findall='find / -name'
alias findh='find ./* -name'
alias findpy='find . -name '\''*.py'\'''
alias findpyg='find . -name '\''*.py'\'' | xargs grep -n --color=auto'
alias yuml='yum --disableexcludes=Local'

# shell的彩色显示
export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
alias la='ls -A'
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -lh'
alias l='ls $LS_OPTIONS -lA'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'

# 重要操作前提示
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
vim的设置 vim
"将一下代码copy到 用户目录下 新建文件为  .vimrc
"保存即可生效; 如果想所有用户生效 请修改 /etc/vimrc (建议先cp一份)

set nocompatible     "not compatible with vi
set number
"set paste
set ruler
set autoindent       "please place the autoindent after paste

set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab        "replace tab with space
set smarttab
set list
set listchars=tab:>-,trail:-

if exists('+colorcolumn')
  set colorcolumn=80
else
  au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
endif
set cursorline       "highlight current line
set scrolloff=6

set autochdir
set foldenable
set foldmethod=indent
set fml=7
set foldnestmax=1

set hlsearch
set incsearch

set encoding=utf-8
set fileencoding=utf-8

syntax on
filetype plugin on

map <F12> :!python %

" for pyflakes's conflict with ubuntu terminal
highlight SpellBad cterm=italic ctermbg=14
set updatetime=500
" highlight current word
autocmd CursorHold * silent! exe printf('match incsearch /\<%s\>/', expand('<cword>'))
autocmd CursorHold * silent! foldopen


if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
Global site tag (gtag.js) - Google Analytics