装系统用gentoo

gentoo还真是费电啊,:-) 转自水木 发信人: arsenal (为人民服务), 信区: MilitaryJoke 标 题: Re: 当大国是要负责任的 发信站: 水木社区 (Thu Dec 3 23:56:09 2009), 站内 那帮无耻之徒洗衣服还用热水,干衣服还用烘干机,装系统用gentoo,下了班还不关灯,纯 浪费 【 在 lin (没有) 的大作中提到: 】 : 标 题: Re: 当大国是要负责任的 : 发信站: 水木社区 (Thu Dec 3 23:54:25 2009), 站内 : : 坏什么呀,你看那些发达国家都那么高的排放量,富人烧上炕了, : 咱穷人就只能硬挺着啊? : : 【 在 amdopteron (皓龙) 的大作中提到: 】 : : TG太坏了…… : : : -- : : ※ 来源:·水木社区 newsmth.net·[FROM: 114.245.140.*] -- ※ 来源:·水木社区 newsmth.net·[FROM: 221.217.204.*]

December 3, 2009 · notsobad

shell中的heredoc使用

shell中的heredoc很有用,对于临时的创建一个较长的字符串,比如脚本中要创建一个脚本等,就可以用这个 参考 Here Documents heredoc中的变量,shell命令都会被执行 下面的脚本创建了一串ftp命令,供ftp命令使用 Filename=`basename $1` # Strips pathname out of file name. Server="ibiblio.org" Directory="/incoming/Linux" # These need not be hard-coded into script, #+ but may instead be changed to command-line argument. Password="your.e-mail.address" # Change above to suit. ftp -n $Server << End-Of-Session # -n option disables auto-logon user anonymous "$Password" binary bell cd $Directory put "$Filename.lsm" put "$Filename.tar.gz" bye End-Of-Session 注意,如果想输出原始字符,即不希望‘$’符号被替换为变量,需要把引导字符用引号引起来,或者添加转义符。 ...

December 3, 2009 · notsobad

使用vi来编辑python代码

使用vi来编辑python代码,参考这如下文章 [Python and vim: Make your own IDE](http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own- ide/) Indenting Python with VIM 主要的: 在.vimrc中 filetype plugin indent on AutoCmd FileType python set complete+=k~/.vim/syntax/python.vim isk+=.,( AutoCmd BufNewFile,BufRead *.py \ setlocal tabstop=4 \ setlocal softtabstop=4 \ setlocal shiftwidth=4 \ setlocal textwidth=80 \ setlocal smarttab \ setlocal expandtab \ setlocal smartindent \ setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif,=except,0#

December 2, 2009 · notsobad

linux在脚本中重定向输出

关于linux下io重定向的几篇文章 A Detailed Introduction to I/O and I/O Redirection [Advanced Bash- Scripting Guide I/O Redirection](http://www.faqs.org/docs/abs/HTML/io- redirection.html) linux下三种文件是默认打开的,stdin(键盘), stdout(屏幕), stderr(错误信息,输出到屏幕),这三个和其它的打开文件都是可以被重定向的。 有一个脚本a.sh,我想把它的输出全部重定向到一个文件中去,如何做呢? 通常我们会在调用时做 sh a.sh >/tmp/out.txt 2>&1 但是如果调用是程序没办法控制的,如何在这个脚本内部做呢? 写一个测试脚本看下 #cat a.sh ...

November 30, 2009 · notsobad

ubuntu下安装chrome浏览器

ubuntu下安装chrome浏览器 编辑/etc/apt/sources.list Ubuntu 9.04 (Jaunty) 添加这个源 deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main ubuntu 9.10 (Karmic) 添加这个源 deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main 然后运行 sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5 之后就可以安装了 sudo apt-get update && sudo apt-get install chromium-browser -y

November 29, 2009 · notsobad

什么是bing?

今天看到了个说法 什么是bing? Bing Is Not Google 参考GNU GNU’s Not Unix

November 28, 2009 · notsobad

推荐两款Google Chrome插件

先来一个Chrome插件的网站,Chrome Extensions。 这里有很多的插件可以下载,不过大部分的插件都没有太大的实用价值。 首先要说明:要想安装这些插件需要先把Chrome升级到4.0版本。现在官方发布的Chrome是3.0的。 所以需要到Chrome的下载地方下载开发中的版本。 下载地址:http://build.chromium.org/buildbot/snapshots/chromium-rel-xp 找最下面那个最新的版本下载。 下面只推荐个人觉得比较实用的插件。 Feedly: Firefox的feedly插件就很有名。喜欢RSS订阅的用户都应该比较清楚。Feedly可以把Google reader中 的文章向非常酷的Blog的那样显示。显示格式要比在Google reader读的效果要好很多。使用也非常方便。 可以在这里下载 Download Feedly ...

November 27, 2009 · notsobad

linux下screen使用

Screen是一个可以在多个进程之间多路复用一个物理终端的窗口管理器。Screen中有会话的概念,用户可以在一个screen会话中创建多个screen窗口,在每一个screen窗口中就像操作一个真实的telnet/SSH连接窗口那样 最简单使用 ...

November 26, 2009 · notsobad

webfaction中django问题

webfaction中django配置,通用的没什么可讲的,只是有几点需要注意的. webfaction的web目录不能是一个链接,必须是一个实际的目录. 修改了除模板,media以外的任意文件,都要重启apache。 为了方便,把几个bin目录加到PATH里 把这一行加入~/.bashrc ...

November 26, 2009 · notsobad

获取所有图片的Bookmarklet

先推荐几个工具: Online Javascript compressor(javascript压缩工具) Javascript beautifier(js格式化工具) 我在这里有收集。 我写了个小工具,加到书签中,请将它加入浏览器收藏夹,然后在有图片的网页上点击这个地址,就会弹出此网页上的所有图片链接。 获取图片 附代码: 注意: ...

November 25, 2009 · notsobad