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
<?php | |
class IP_Check{ | |
private $ip_china = array( | |
array(167772160,184549375), //10.0.0.0~10.255.255.255 | |
array(2886729728,2887778303), //172.16.0.0~172.31.255.255 | |
array(3232235520,3232301055), //192.168.0.0~192.168.255.255 | |
array(17563648, 17825791), | |
array(18350080, 18874367), | |
array(453509120, 455081983), | |
array(455344128, 456130559), |
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
<?php | |
/*** | |
* 加密函数(密文具有有效期,可逆,根据时间生成不同的密文) | |
* @param $string | |
* @param string $operation | |
* @param string $key | |
* @param int $expiry | |
* @return string | |
*/ |
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
<?php | |
error_reporting(0); //抑制所有错误信息 | |
@header("content-Type: text/html; charset=utf-8"); //语言强制 | |
ob_start(); | |
$title = "Yahei-PHP Prober"; | |
$version = "v0.3.5"; //版本号 | |
define('HTTP_HOST', preg_replace('~^www\.~i', '', $_SERVER['HTTP_HOST'])); |
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 | |
# By Shenyubao <[email protected]> | |
VIM_VERSION=$(vim --version | grep IMproved | awk '{print $5}') | |
if [ $VIM_VERSION = "7.4" ];then | |
echo "this is already vim 7.4" | |
exit; | |
fi | |
confirm() { |
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
// 脚本内容 | |
// 注意修改脚本17行中的路径 与15行中的tag | |
tell application "System Events" | |
set processList to (name of processes) | |
end tell | |
if processList does not contain "Evernote" then | |
tell application id "com.evernote.evernote" | |
activate |
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/sh | |
# Ver 0.02 | |
# Changes the handling of time zones | |
OFOC="com.omnigroup.OmniFocus" | |
if [ ! -d "$HOME/Library/Caches/$OFOC" ]; then OFOC=$OFOC.MacAppStore; fi | |
OFQUERY="sqlite3 $HOME/Library/Caches/$OFOC/OmniFocusDatabase2" | |
TODAY=$(date -v0H -v0M -v0S +%s) #Midnight at the start of today: set the time component to 00:00 | |
NOW=$(date +%s) # the date command automatically allows for daylight savings like BST in the UK | |
DAY=86400; |
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
from scrapy.item import Item, Field | |
class BanksiteItem(Item): | |
# define the fields for your item here like: | |
# name = Field() | |
id = Field() | |
bank = Field() | |
province = Field() | |
city = Field() | |
name = Field() |