This file contains 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
import socket | |
import fcntl | |
import struct | |
import os | |
def get_ip_address(ifname): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
return socket.inet_ntoa(fcntl.ioctl(s.fileno(),0x8915,struct.pack('256s', ifname[:15]))[20:24]) | |
interface = 'eth0' |
This file contains 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
#Google和各种网站的IPv6服务hosts | |
#利用IPv6技术翻墙,保证Google服务可用,校园网用户使用IPv6应该不收取上网费用(至少我们学校如此) | |
#最下方有各种网站的IPv6hosts列表 | |
#欢迎转载,请注明来源,谢谢 | |
#本文的发布地址:http://docs.google.com/View?id=dfkdmxnt_61d9ck9ffq | |
#本文的共享链接:https://docs.google.com/View?docID=0ARhAbsvps1PlZGZrZG14bnRfOTVmZzR4NjRkdA&revision=_latest | |
#表格版的host列表地址:http://spreadsheets.google.com/ccc?key=0AhhAbsvps1PldEVXVzBkR3hBaWFnbEQ0OWIwMU5ycmc&hl=zh_CN | |
#Google IPv6 地址及对应证书列表(不再细分):https://docs.google.com/Doc?docid=0ARhAbsvps1PlZGZrZG14bnRfOTVmZzR4NjRkdA&hl=en |
This file contains 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
#============================================================================= | |
# FileName: ipv6 | |
# Desc: 说明文档 | |
# Author: luoshu | |
# Email: [email protected] | |
# HomePage: http://www.luoshu.me | |
# Version: 0.0.1 | |
# LastChange: 2011-06-24 04:23:29 |
This file contains 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 | |
# | |
# Yupoo 照片备份工具 | |
# 此工具不需要API,直接就能备份你的照片信息,下载后以图片 + 一个文本文件的方式存放 | |
# 备份包括内容: | |
# 原图,标题,说明,Tag,当然有 Exif 信息 | |
# | |
# Jason Lee <[email protected]> | |
# http://huacnlee.com | |
# 2011-01-28 |
This file contains 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
location / { | |
if (!-f $request_filename){ | |
set $rule_0 1$rule_0; | |
} | |
if (!-d $request_filename){ | |
set $rule_0 2$rule_0; | |
} | |
if ($rule_0 = "21"){ | |
rewrite ^/(post|record|sort|author|page)-([0-9]+)\.html$ /index.php?$1=$2; | |
rewrite ^/(post|record|sort|author|page)/([0-9]+)$ /index.php?$1=$2; |
This file contains 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
location / { | |
if (!-f $request_filename) | |
{ | |
set $rule_0 1$rule_0; | |
} | |
if (!-d $request_filename) | |
{ | |
set $rule_0 2$rule_0; | |
} | |
if ($rule_0 = "21") |