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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="http://d3js.org/d3.v2.min.js?2.10.0"></script> | |
<script> | |
var width = 960, | |
height = 700; | |
var svg = d3.select("body").append("svg") |
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
function qSort(compare) { | |
var swap = (p1, p2) => { | |
var tmp = this[p1]; | |
this[p1] = this[p2]; | |
this[p2] = tmp; | |
} | |
var sortRange = (start, end) => { | |
var midValue = this[start]; | |
var p1 = start, p2 = end - 1; | |
while(p1 < p2) { |
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
FROM google/debian:jessie | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update -qqy \ | |
&& apt-get -qqy install \ | |
gnupg wget ca-certificates apt-transport-https \ | |
ttf-wqy-zenhei \ | |
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* |
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
var CryptoJS = require('crypto-js') | |
var request = require('request-promise') | |
/* | |
* npm install crypto-js request-promise | |
* node wx_t1t_hack.js | |
*/ | |
// export function testEncription(msg, fullKey) { | |
// var fullKey = fullKey.slice(0, 16) |
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/python | |
# usage python unwxapkg.py filename | |
import sys,os | |
import struct | |
class WxapkgFile: | |
nameLen = 0 | |
name = "" |
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 { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
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
//Map Collect function | |
// Since the builtin map-merge function in Sass only take 2 arguments, it can only merge 2 maps at a time. | |
// The map-collect function below allows you to combine multiple maps together in a cleaner way. | |
@function map-collect($maps...) { | |
$collection: (); | |
@each $map in $maps { | |
$collection: map-merge($collection, $map); | |
} |