$ ruby -run -e httpd . -p 9090
$ python -m SimpleHTTPServer -p 8000
$ ruby -run -e httpd . -p 9090
$ python -m SimpleHTTPServer -p 8000
M-x find-name-dired
: RET
Press t
to "toggle mark" for all files found.
Press Q
for "Query-Replace in Files...": you will be prompted for query/substitution regexps.
Proceed as with query-replace-regexp: SPAC
E to replace and move to next match, n
to skip a match, etc.
git branch -D `git for-each-ref --format="%(refname:short)" refs/heads/3.2\*`
把3.2换成要删除分支的前缀, 比如hotfix
打印文件里的指定行
sed -n '10q;6,10p' file
#!/bin/bash | |
CONTAINER=$1 | |
PID=$(docker inspect $CONTAINER | grep Pid | grep -Eo [0-9]+) | |
nsenter --target $PID --mount --uts --ipc --net --pid |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
end |
tcpdump -A -vvvv -s 9999 -i eth0 port 80 > /tmp/sample
(defun goto-template() | |
"Jump to correspondence Django template file" | |
(interactive) | |
(let (tmplName projectDir appName) | |
(setq projectDir "/home/shellfly/project/src") | |
(setq tmplName (thing-at-point 'filename)) | |
(setq appName (car (split-string tmplName "/"))) | |
(find-file (concat | |
(file-name-as-directory projectDir) | |
(file-name-as-directory appName) |
Depends on http://github.com/bdauvergne/python-oath
pip install -e "git://github.com/bdauvergne/python-oath.git#egg=oath-dev"
Generate a secret key (and for fun, the QR code URL that can
be imported by the Google Authenticator scanner) with gen_google_code.py
.
See http://www.google.com/support/accounts/bin/answer.py?answer=1066447 for what to do with this.