Skip to content

Instantly share code, notes, and snippets.

View huanzhang's full-sized avatar

Zhang Huan huanzhang

View GitHub Profile
@huanzhang
huanzhang / md5.js
Created May 21, 2019 10:14
md5 implement javascript
var MD5 = function (string) {
function RotateLeft(lValue, iShiftBits) {
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
}
function AddUnsigned(lX, lY) {
var lX4, lY4, lX8, lY8, lResult;
lX8 = lX & 0x80000000;
lY8 = lY & 0x80000000;
lX4 = lX & 0x40000000;
#!/usr/bin/env python
RS_HOST = 'cmcmbilling.c2upikbi0jsb.ap-northeast-2.redshift.amazonaws.com'
RS_PORT = '5439'
RS_DB = 'cmcmbilling'
RS_USER = ''
RS_PASS = ''
#!/usr/bin/env python
import collections
SG_DATA_OUT_PRICING = [
(1, 0),
(10*1024-1, 0.12),
(40*1024, 0.085),
(100*1024, 0.082),
(350*1024, 0.080)