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 | |
import os | |
import sys | |
import glob | |
pngcrush = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush" | |
destination = os.path.join(os.environ['HOME'], 'Desktop') | |
for ipa in sys.argv: |
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
"不兼容vi | |
set nocompatible | |
"让删除键更好用 | |
set backspace=2 | |
"不创建撤销文件 | |
set noundofile | |
"取消自动备份 | |
set nobackup | |
"自动缩进 | |
set autoindent |
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 | |
define("DES_KEY", "SCUBEPGW"); | |
define("HASH_PAD", "0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003021300906052b0e03021a05000414"); | |
bcscale(0); | |
$private_key = array(); | |
if (!function_exists('hex2bin')) | |
{ | |
function hex2bin($hexdata) | |
{ | |
$bindata = ''; |
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 | |
$_G['mnid'] = 'mn_N'.substr(md5('your_link'), 0, 4); | |
//地址在discuz后台主导航里面找 |
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 | |
/** | |
* IP 地理位置查询类 | |
* | |
* @author joyphper | |
* @version 1.0 | |
* @copyright 2010 joyphper.net | |
*/ | |
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 | |
require './source/class/class_core.php'; | |
$discuz = & discuz_core::instance(); | |
$discuz->init(); | |
$credit = & credit::instance(); | |
$sql = 'select uid from ' . DB::table('common_member'); | |
$users = DB::fetch_all($sql); | |
//重新计算用户积分 |
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 | |
from urllib import request | |
from urllib import parse | |
from http import cookiejar | |
username = 'your_username' | |
password = 'your_password' | |
login_url = 'https://fengcheco.com/auth/identity/callback' | |
project_id = 'your_project_id' | |
iteration_id = 'your_iteration_id' |
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
::方便调试set cur_path = %cd% | |
e: | |
cd e:\www\CGBT2 | |
git checkout gh-pages | |
php e:\www\newcgbt_release\v2.0\tools\db_dict_generator.php | |
move C:\Users\Lee\Desktop\db_dict.html e:\www\CGBT2 | |
git add db_dict.html | |
git commit -am "generate database dict, %date:~0, 10%" | |
git push origin gh-pages | |
git checkout master |
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 | |
/** | |
* 生成mysql数据字典 | |
*/ | |
header("Content-type: text/html; charset=utf-8"); | |
// 配置数据库 | |
$dbserver = "localhost"; | |
$dbusername = "mysql用户名"; | |
$dbpassword = "mysql密码"; |
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 size_format( $bytes, $decimals = 0 ) { | |
$quant = array( | |
// ========================= Origin ==== | |
'TB' => 1099511627776, // pow( 1024, 4) | |
'GB' => 1073741824, // pow( 1024, 3) | |
'MB' => 1048576, // pow( 1024, 2) | |
'kB' => 1024, // pow( 1024, 1) | |
'B ' => 1, // pow( 1024, 0) | |
); | |
foreach ( $quant as $unit => $mag ) |