Skip to content

Instantly share code, notes, and snippets.

View wowlusitong's full-sized avatar
🏠
Working remotely

卢思侗 wowlusitong

🏠
Working remotely
  • Harbin, China
View GitHub Profile
@wowlusitong
wowlusitong / index.html
Created February 23, 2020 13:38 — forked from minikomi/index.html
Japan geojson - albers
<!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")
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) {
@wowlusitong
wowlusitong / Dockerfile
Created March 17, 2018 04:25 — forked from linw1995/Dockerfile
Google Chrome Headless Docker
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/*
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)
@wowlusitong
wowlusitong / unwxapkg.py
Created January 1, 2018 02:07 — forked from thedreamwork/unwxapkg.py
unpack wxapkg
#!/usr/bin/python
# usage python unwxapkg.py filename
import sys,os
import struct
class WxapkgFile:
nameLen = 0
name = ""
@wowlusitong
wowlusitong / Enhance.js
Created August 10, 2017 10:34 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@wowlusitong
wowlusitong / sass-map-collect-function.scss
Created July 26, 2017 08:32
Sass function to merge multiple maps - map-collect
//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);
}