Skip to content

Instantly share code, notes, and snippets.

philip PhilipTang

Block or report user

Report or block PhilipTang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wx_t1t_hack.js
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
View unwxapkg.py
#!/usr/bin/python
# usage python unwxapkg.py filename
import sys,os
import struct
class WxapkgFile:
nameLen = 0
name = ""
@PhilipTang
PhilipTang / how-i-solved.java
Created Dec 13, 2016 — forked from ngs/how-i-solved.java
Twitter SSL error causes empty page on android.webkit.WebView
View how-i-solved.java
@Override
public void onReceivedSslError(WebView view,
SslErrorHandler handler, SslError error) {
handler.proceed();
}
@PhilipTang
PhilipTang / update_gfwlist.sh
Created Nov 29, 2016 — forked from VincentSit/update_gfwlist.sh
Automatically update the PAC for ShadowsocksX. Only tested on OS X.
View update_gfwlist.sh
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
View 详细的通知数据示例.md
# 商户签名参数
partner = "123456"
key     = "sdfasdfasdfasfasdfa"
	
# 签名过程
------------- RECEIVE_SUCCESS ---------------
排序前:{"notify_id":"14732279660721951","uid":"foo01","partner":"123456","appid":"abcdefg","trade_status":"RECEIVE_SUCCESS","sign":"","data":"{\"id\":\"1604051506e9e4c591859a2016488e794a44b533\",\"message\":\"\\u606d\\u559c\\u53d1\\u8d22\",\"recipient\":\"userid001\",\"amount\":\"1.00\",\"groupid\":\"\",\"count\":1}","create_time":"2016-09-12 18:30:54","notify_time":"2016-09-12 19:36:59"}
排序后:{"appid":"abcdefg","create_time":"2016-09-12 18:30:54","data":"{\"id\":\"1604051506e9e4c591859a2016488e794a44b533\",\"message\":\"\\u606d\\u559c\\u53d1\\u8d22\",\"recipient\":\"userid001\",\"amount\":\"1.00\",\"groupid\":\"\",\"count\":1}","notify_id":"14732279660721951","notify_time":"2016-09-12 19:36:59","partner":"123456","sign":"","trade_status":"RECEIVE_SUCCESS","uid":"foo01"}
签名原始串:appid=abcdefg&create_time=2016-09-12 18:30:54&data={"id":"1604051506e9e4c591859a2016488e794a44b533","message":"\u606
@PhilipTang
PhilipTang / STD3DES.java
Last active Sep 18, 2019
标准的3DES加密&解密(Java 和 PHP 版)
View STD3DES.java
// javac test3.java
// java test3
import java.security.Key;
import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
import javax.crypto.spec.IvParameterSpec;
View mysql 隔离级别及事务传播
TRANSACTION(事务隔离级别)
1. ISOLATION_DEFAULT:这是一个PlatfromTransactionManager默认的隔离级别,使用数据库默认的事务隔离级别。
每种数据库的默认隔离级别是不同的,例如SQL Server、Oracle默认Read Commited,MySQL默认Repeatable Read。
另外四个与JDBC的隔离级别相对应,不同的隔离级别采用不同的锁类型来实现,在四种隔离级别中,Serializable的
隔离级别最高,Read Uncommited的隔离级别最低。
2. ISOLATION_READ_UNCOMMITTED:读未提交数据,这是事务最低的隔离级别,在并发的事务中,它充许一个事务可以
读到另一个事务未提交的更新数据。(会出现脏读,不可重复读和幻读)
3. ISOLATION_READ_COMMITTED:读已提交数据,保证在并发的事务中,一个事务修改的数据提交后才能被另外一个事
You can’t perform that action at this time.