Skip to content

Instantly share code, notes, and snippets.

wangshijun wangshijun

Block or report user

Report or block wangshijun

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 Mixin Network Introduction.md

开发者接入Mixin Network说明

步骤

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

https://mixin.one

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

@ncochard
ncochard / babel-webpack.md
Last active Oct 14, 2019
The correct way to compile ES6 using babel...
View babel-webpack.md

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
dacodekid / index.html
Last active Jun 28, 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
FabricioRHS / .block
Last active Feb 15, 2019
D3 Sankey Diagram
View .block
border: no
license: gpl-3.0
@schmich
schmich / npm-prerelease.md
Last active Sep 16, 2019
Publish a prerelease package on NPM
View npm-prerelease.md
  • 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
myshov / function_invocation.js
Last active Jul 8, 2019
11 Ways to Invoke a Function
View function_invocation.js
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active Jul 25, 2019
Visual instructions how to enable Google Maps on IOS using react-native-maps
View react-native-maps-enable-google-maps-instructions.md

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 https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

@d3noob
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>
<style>
.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;
@josephg
josephg / server.js
Created May 12, 2016
Slow requires
View server.js
var tree = require("terminal-tree");
const loadingData = [];
var current = loadingData;
global.wr = (_require) => {
return (name) => {
const start = Date.now();
const parent = current;
current = [];
You can’t perform that action at this time.