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
<?php | |
/** | |
* IP 地理位置查询类 | |
* 用法: $ip = new IpLocation(); | |
* var_dump($ip->getlocation("61.163.77.210")); | |
*/ | |
class iplocation | |
{ | |
/** | |
* QQWry.Dat文件指针 |
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
class WeiboMixin(tornado.auth.OAuth2Mixin): | |
"""Weibo authentication using the new Graph API and OAuth2.""" | |
_OAUTH_ACCESS_TOKEN_URL = "https://api.weibo.com/oauth2/access_token?" | |
_OAUTH_AUTHORIZE_URL = "https://api.weibo.com/oauth2/authorize?" | |
_OAUTH_NO_CALLBACKS = False | |
access_token = "" | |
def get_authenticated_user(self, redirect_uri, client_id, client_secret, |
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
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
12306 Booking Assistant | |
Copyright (C) 2011 Hidden | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011 Jingqin Lynn | |
12306 Auto Login => A javascript snippet to help you auto login 12306.com. | |
Copyright (C) 2011 Kevintop |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import os, sys | |
iswindows = 'win32' in sys.platform.lower() or 'win64' in sys.platform.lower() | |
isosx = 'darwin' in sys.platform.lower() | |
def convert(dirname, size='640x640'): |
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
# -*- Encoding: utf-8 -*- | |
import base64 | |
import binascii | |
import cgi | |
import hashlib | |
import hmac | |
import logging | |
import time | |
import urllib | |
import urlparse |
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 gevent | |
from gevent import monkey, queue | |
monkey.patch_all() | |
import urllib2 | |
from time import sleep | |
import traceback | |
import logging |
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
<?php | |
error_reporting(7); | |
ob_start(); | |
$mtime = explode(' ', microtime()); | |
$starttime = $mtime[1] + $mtime[0]; | |
$admin['check'] = "1"; | |
$retime = "yes"; |
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
<?php | |
/** | |
* 根据指定类生成SOAP WSDL文件 | |
* | |
* @version 0.2 | |
* @author Jerry [email protected] | |
* @example PhpWSDL::genWSDL("ClassName", "http://localhost/soap") | |
*/ |
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 | |
real_create_conn = socket.create_connection | |
def set_src_addr(*args): | |
address, timeout = args[0], args[1] | |
source_address = ('IP_ADDR_TO_BIND_TO', 0) | |
return real_create_conn(address, timeout, source_address) | |
socket.create_connection = set_src_addr |
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
/*=====日历控件=========*/ | |
.calendar2{*width:536px;} | |
.calendar1{*width:268px;} | |
.calendar{ | |
border: 1px solid #e1e1e1; | |
background-color: #ffffff; | |
border: 1px solid #ccc; | |
border: 1px solid rgba(0, 0, 0, 0.2); | |
-webkit-border-radius: 2px; | |
-moz-border-radius: 2px; |
OlderNewer