Skip to content

Instantly share code, notes, and snippets.


wangshijun wangshijun

View GitHub Profile
View Mixin Network

开发者接入Mixin Network说明


1. 开发者自己创建一个mixin 账户

2. 开发者使用注册的mixin账户创建App并进行配置

ncochard /
Last active Aug 5, 2020
The correct way to compile ES6 using babel...

When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:

  1. Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
  2. Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
  3. Is it going to be used as a dependency to a browser application (always bundled)?.
  • In cases 2) and 3) you want to allow for tree shaking.
  • In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
  • In case 3) you also want to benefit from the native support of "ES6" from your browser.
dacodekid / index.html
Last active Dec 14, 2019
Hugo with Webpack Integration
View index.html
<!-- refer generated css/js file -->
<link rel="stylesheet" href="{{$.Site.BaseURL}}/{{ if eq (getenv "APP_ENV") "dev" }}main.css{{ else }}{{ index .Site.Data.manifest "main.css" | relURL }}{{ end }}">
<script type="text/javascript" src="{{$.Site.BaseURL}}/{{ if eq (getenv "APP_ENV") "dev" }}main.js{{ else }}{{ index .Site.Data.manifest "main.js" | relURL }}{{ end }}"></script>
FabricioRHS / .block
Last active Feb 15, 2019
D3 Sankey Diagram
View .block
border: no
license: gpl-3.0
Globik / index.html
Created May 1, 2017
Websocket multi room based on ws.js
View index.html
<h5>Group: <span id="group">darwin</span></h5>
<!-- a hardoced group name -->
<button onclick="bjoin();">join group</button><br>
<input id="text" type="text"/>
<span id="out"></span>
var group=document.getElementById("group").textContent;
schmich /
Last active Jul 2, 2020
Publish a prerelease package to NPM
  • Update package.json, set version to a prerelease version, e.g. 2.0.0-rc1, 3.1.5-rc4, ...
  • Run npm pack to create package
  • Run npm publish <package>.tgz --tag next to publish the package under the next tag
  • Run npm install --save package@next to install prerelease package
myshov / function_invocation.js
Last active Jun 5, 2020
11 Ways to Invoke a Function
View function_invocation.js
(_ => console.log(2))();
eval('console.log(3);');, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);, null, [9]);, null, 10);
heron2014 /
Last active Apr 6, 2020
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check

Steps from scratch:

1.react-native init GoogleMapPlayground

d3noob / index.html
Last active Sep 1, 2018
Sankey Diagram with v4
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>SANKEY Experiment</title>
.node rect {
cursor: move;
fill-opacity: .9;
shape-rendering: crispEdges;
View markdownhere.css
.markdown-here-wrapper {
font-size: 16px;
line-height: 1.8em;
letter-spacing: 0.1em;
pre, code {
font-size: 14px;
font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace;
You can’t perform that action at this time.