摘要: 转自http://coolshell.cn/articles/2822.html这里给大家介绍一个小技巧用来恢复一些被rm了的文件中的数据。我们知道,rm命令其实并不是真正的从物理上删除文件内容,只过不把文件的inode回收了,其实文件内容还在硬盘上。所以,如果你不小删除了什么比较重要的程序配置文件的时候,我们完全可以用grep命令在恢复,下面是一个恢复示例:查看源代码打印帮助1grep -a -B 50 -A 60 'some string in the file' /dev/sda1 > results.txt说明:关于grep的-a意为–binary-files=t 阅读全文
posted @ 2010-09-03 10:19 酱油哥 阅读(166) 评论(0) 推荐(0)
摘要: sudo apt-get install poppler-datasudo apt-get install xpdf-chinese-simplified xpdf-chinese-traditional 阅读全文
posted @ 2010-08-29 13:44 酱油哥 阅读(131) 评论(0) 推荐(0)
摘要: <location /># Insert filterSetOutputFilter DEFLATE# Netscape 4.x has some problems...BrowserMatch ^Mozilla/4 gzip-only-text/html# Netscape 4.06-4.08 have some more problemsBrowserMatch ^Mozilla/4/.0[678] no-gzip# MSIE masquerades as Netscape, but it is fine# BrowserMatch /bMSIE !no-gzip !gzip- 阅读全文
posted @ 2010-08-24 13:03 酱油哥 阅读(184) 评论(0) 推荐(0)
摘要: 转自:http://ipie.blogbus.com/logs/19379694.html首先要搞清楚,字符串在Python内部的表示是unicode编码,因此,在做编码转换时,通常需要以unicode作为中间编码,即先将其他编码的字符串解码(decode)成unicode,再从unicode编码(encode)成另一种编码。 decode的作用是将其他编码的字符串转换成unicode编码,如str1.decode('gb2312'),表示将gb2312编码的字符串转换成unicode编码。encode的作用是将unicode编码转换成其他编码的字符串,如str2.encode 阅读全文
posted @ 2010-08-10 12:35 酱油哥 阅读(177) 评论(0) 推荐(0)
摘要: django upload file needs "Note thatFILESwill only contain data if the request method was POST and the<form>that posted to the request hadenctype="multipart/form-data". Otherwise,FILESwill be a blank dictionary-like object."so only need add "multipart : 'form-data&# 阅读全文
posted @ 2010-07-29 23:37 酱油哥 阅读(218) 评论(0) 推荐(0)