This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim color file | |
" Maintainer: Bohdan Vlasyuk <bohdan@vstu.edu.ua> | |
" Last Change: 2008 Jul 18 | |
" darkblue -- for those who prefer dark background | |
" [note: looks bit uglier with come terminal palettes, | |
" but is fine on default linux console palette.] | |
set bg=dark | |
hi clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 虚拟IP。我一般用来linux和虚拟机之间共享用的,因为考虑到linux宿主机的ip是动态ip会变化。我所见到的实际用途是负载均衡。 | |
sudo ifconfig eth1:0 125.12.12.77 | |
2. windows根据 ip查看主机名,公司内部主机名一般会是ALIBABA-XXXXX,XXXXX就是工号,这样就可以找到对应的人,当然如果是隔日的,需要考虑动态IP的问题。 | |
nbtstat -a IP | |
3. awk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# SVN Diff Wrapper for Meld | |
# KOG 2008-02 | |
# http://www.nabble.com/How-to-use-meld-with-'svn-diff'-td16765244.html | |
left="$6" | |
right="$7" | |
meld "$left" "$right" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# development toolkits | |
apt-get install curl git mercurial vim | |
curl http://peak.telecommunity.com/dist/ez_setup.py | sudo python | |
easy_install pip | |
pip install virtualenv | |
pip install virtualenvwrapper | |
git clone http://github.com/revans/bash-it.git ~/.bash_it | |
~/.bash_it/install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" set tab to 4 space | |
set smartindent | |
set expandtab | |
set tabstop=4 | |
set shiftwidth=4 | |
" display line number | |
set nu | |
" display tab and space as some other remarkable characters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP_DIR=~/dev/jucan | |
VIRTUALENV_DIR = ~/.virtualenv | |
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e | |
tar -xzvf setuptools-0.6c11.tar.gz | |
sudo python setuptools-0.6c11/setup.py install | |
sudo easy_install pip | |
sudo pip install virtualenv | |
sudo pip install virtualenvwrapper | |
source /usr/local/bin/virtualenvwrapper.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/5 * * * * cmd #表示每五分钟运行一次 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rabbitmqctl add_vhost afaker | |
sudo rabbitmqctl set_permissions -p afaker fanjubian ".*" ".*" ".*" |
OlderNewer