文字+图片背景 links:
This file contains hidden or 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
| # -*- coding=utf-8 -*- | |
| ''' | |
| Created on 2011-12-4 | |
| @author: liuyix | |
| ''' | |
| ''' | |
| 输入文件格式定义:每行一个isbn,可能有重复,错误的 | |
| 输出格式: | |
| 书名--评分--评分人数--作者--出版社等信息--豆瓣链接--书简介--rawxml |
This file contains hidden or 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
| #!/usr/bin/env python | |
| #-*- encoding:utf-8 -*- | |
| def addr_filter(pc, addr, collect_stack=False): | |
| if pc is not None and pc <= 0x4fffff: | |
| if (addr > 0x7fff00000000 and collect_stack) \ | |
| or (addr <= 0x7fff00000000 and not collect_stack): | |
| return True | |
| return False |
This file contains hidden or 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
| #去优酷广告 | |
| 0.0.0.0 stat.youku.com | |
| 0.0.0.0 static.lstat.youku.com | |
| 0.0.0.0 valb.atm.youku.com | |
| 0.0.0.0 valc.atm.youku.com | |
| 0.0.0.0 valf.atm.youku.com | |
| 0.0.0.0 valo.atm.youku.com | |
| 0.0.0.0 valp.atm.youku.com | |
| 0.0.0.0 vid.atm.youku.com | |
| 0.0.0.0 walp.atm.youku.com |
This file contains hidden or 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/bash | |
| # http://stackoverflow.com/a/422123 | |
| # http://stackoverflow.com/questions/242538/unix-shell-script-find-out-which-directory-the-script-file-resides | |
| dir=$(dirname $(readlink -f "$BASH_SOURCE")) |
This file contains hidden or 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
| #!/usr/bin/python | |
| #-*- encoding:utf-8 -*- | |
| class ClassTest: | |
| FOO = 'foo' | |
| __bar = 'secret!' | |
| def __init__(self, **args): | |
| self.__dict = {} | |
| self.__dict[ClassTest.FOO] = args[ClassTest.FOO] | |
| self.fill_dict(ClassTest.FOO, **args) |
This file contains hidden or 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 exist() { | |
| if [ ! -z $1 ];then | |
| if ls $1 &>/dev/null;then | |
| echo 0 | |
| return 0 | |
| fi | |
| fi | |
| echo 1 | |
| return 1 | |
| } |
make_ext4fs -l 512M -s -a system system.img ./system
- -l partition size
- -s sparse mode 压缩模式,将image文件压缩
- -a system mount point make_ext4fs会根据private/android_filesystem_config.h里定义好的权限来给文件夹里的所有文件重新设置权限
- ./system file directory
This file contains hidden or 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
| #credit:http://www.cyberciti.biz/faq/bash-csh-sh-check-and-file-file-size/ | |
| stat -c %s $file |