发现gladder用不了, 安装一下大名鼎鼎的tor #fuck gfw
$ sudo apt-get install tor
启动:
$ sudo /etc/init.d/tor start
关闭:
$ sudo /etc/init.d/tor stop
$ 安装firefox扩展foxyProxy
(https://addons.mozilla.org/en-US/firefox/addon/2464)
配置foxyproxy选项
新建代理服务器
- 常规标签: Proxy Name 可任意填写,如“blogspot”
- 代理服务器细节: host or ip: 127.0.0.1 port: 9050
勾上 socks proxy, socks v4/4a
- URL patterns 添加和谐ed网站:
例如:
URL 或 URL 模板内输入:*.blogspot.com/*
勾选白名单,勾选通配符
2009年6月22日星期一
2009年5月2日星期六
2009年5月1日星期五
ssh使用scp远程传输文件
suppose we have an ssh connection:
ssh -p 22 user@remote-host
copy file from remote host:
scp -P 22 user@remote-host:/path/to/file /localpath/to/save
copy file to remote host:
scp -P 22 /file/to/transfer user@remote-host:/path/to/save
ssh -p 22 user@remote-host
copy file from remote host:
scp -P 22 user@remote-host:/path/to/file /localpath/to/save
copy file to remote host:
scp -P 22 /file/to/transfer user@remote-host:/path/to/save
2009年2月26日星期四
二进制diff工具xdelta
diff和patch是针对文本文件的一对工具.
如果要处理的是二进制文件,可以使用一个专门用来处理二进制文件的工具xdelta.
比如你以前下载了 emacs-23.0.90.tar.gz (41M), 现在 emacs-23.0.91.tar.gz 出来了,你可以只下载一个emacs-23.0.90-23.0.91.xdelta (622K), 而不必下载 emacs-23.0.91.tar.gz.
安装xdelta:
sudo apt-get install xdelta
文档:
man xdelta
生成补丁(Delta):
xdelta delta fromfile tofile patchout
应用补丁(Patch):
xdalta patch patchout
例如:
xdalta patch emacs-23.0.90-23.0.91.xdelta
不会把原文件覆盖掉,会生成一个emacs-23.0.91.tar.gz
查看补丁(Info):
xdelta info ***.xdelta
里面有文件名, 长度, md5等信息.
如果要处理的是二进制文件,可以使用一个专门用来处理二进制文件的工具xdelta.
比如你以前下载了 emacs-23.0.90.tar.gz (41M), 现在 emacs-23.0.91.tar.gz 出来了,你可以只下载一个emacs-23.0.90-23.0.91.xdelta (622K), 而不必下载 emacs-23.0.91.tar.gz.
安装xdelta:
sudo apt-get install xdelta
文档:
man xdelta
生成补丁(Delta):
xdelta delta fromfile tofile patchout
应用补丁(Patch):
xdalta patch patchout
例如:
xdalta patch emacs-23.0.90-23.0.91.xdelta
不会把原文件覆盖掉,会生成一个emacs-23.0.91.tar.gz
查看补丁(Info):
xdelta info ***.xdelta
里面有文件名, 长度, md5等信息.
2009年2月1日星期日
svn 导入数据到版本库
$ svnadmin create /home/svn/someproject
$ svn import mytree file:///home/svn/someproject -m "Initial import"
在导入之后,原来的目录树并没有转化成工作拷贝,
为了开始工作,还是需要运行svn checkout导出一个工作拷贝:
$ svn co file:///home/svn/someproject
svn book:
http://www.subversion.org.cn/svnbook/1.4/index.html
$ svn import mytree file:///home/svn/someproject -m "Initial import"
在导入之后,原来的目录树并没有转化成工作拷贝,
为了开始工作,还是需要运行svn checkout导出一个工作拷贝:
$ svn co file:///home/svn/someproject
svn book:
http://www.subversion.org.cn/svnbook/1.4/index.html
2009年1月12日星期一
grep -- output context line
grep输出匹配的上下文 (Context Line Control):
Places a line containing a group separator (--) between contiguous groups of matches.
note: With the -o or --only-matching option, these has no effect and a warning is given
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines.
-B NUM, --before-context=NUM
Print NUM lines of leading context before matching lines.
-C NUM, -NUM, --context=NUM
Print NUM lines of output context.
Places a line containing a group separator (--) between contiguous groups of matches.
note: With the -o or --only-matching option, these has no effect and a warning is given
2009年1月9日星期五
[less]Colorful man pages
上一回说了使用 export PAGER=most来使man有颜色, 不过most用得不是很爽..
现在发现less也可以彩色, 方法如下:
在 .bashrc里 添加如下内容:
现在发现less也可以彩色, 方法如下:
在 .bashrc里 添加如下内容:
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
2009年1月7日星期三
2款http调试工具
2008年12月17日星期三
彩色man (使用most)
export PAGER=most
然后 man 就可以看到彩色了~

这里是more, less, most的介绍:
里面一句话很有趣:
If less is more than more, most is more than less
可惜most的j, k两个按键不是`上下',
下载most-5.0.0.tar.gz, 山寨了一把, good~
然后 man 就可以看到彩色了~

这里是more, less, most的介绍:
里面一句话很有趣:
If less is more than more, most is more than less
可惜most的j, k两个按键不是`上下',
下载most-5.0.0.tar.gz, 山寨了一把, good~
2008年12月16日星期二
grep -- Selecting the non-matching lines
-v, --invert-match
Invert the sense of matching, to select non-matching lines. (-v is specified by POSIX.)
再来个很有用的选项, 只输出匹配部分:
-o, --only-matching
Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.
Invert the sense of matching, to select non-matching lines. (-v is specified by POSIX.)
再来个很有用的选项, 只输出匹配部分:
-o, --only-matching
Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.
订阅:
博文 (Atom)