Skip to content

Instantly share code, notes, and snippets.

View mingelz's full-sized avatar

尚左 mingelz mingelz

View GitHub Profile
@mingelz
mingelz / mmd.js
Created June 19, 2018 10:38
mini markdown parser
/**
* ref: https://github.com/p01/mmd.js
*
* mingelz
* 2015-02-07
*/
function mmd (src) {
function escape (str) {
return new Option(str).innerHTML;
}
@mingelz
mingelz / promisify.js
Created May 30, 2017 08:24
promisify, promisifyAll
'use strict'
/**
* ref.
* + https://github.com/digitaldesignlabs/es6-promisifys
* + https://cnodejs.org/topic/56cd6234e135f51a1ae89b15
*/
const promisify = (method, context) => {
// 因为有可能需要获取运行时的 this,所以没有用箭头函数
@mingelz
mingelz / dabblet.css
Created July 30, 2013 08:34 — forked from anonymous/dabblet.css
Untitled
body{padding-top:30px;background-color:#555a61;}
#progressbar{position:relative;z-index:1;margin:0 auto;width:20em;height:20em;background-color:#444a50;border-radius:10em;box-shadow:0 .1em .3em #3f444a inset;font-size:10px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);}
#progressbar:before{content:'\20';position:absolute;z-index:10;left:2em;top:2em;width:16em;height:16em;overflow:hidden;background-color:#555a61;border-radius:8em;box-shadow:0 .1em .3em #3f444a;}
#progressbar:after{content:'\20';position:absolute;z-index:9;left:2.85em;top:2.82em;width:1.6em;height:1.6em;background-color:#d9dbdb;border-radius:1.6em;}
s{position:absolute;left:.2em;top:.2em;border:1.6em solid;width:16.4em;height:16.4em;border-radius:10em;}
.p50,
.p100{display:none;z-index:2;border-color:#d9dbdb #d9dbdb transparent transparent;}
.p50:after,
.p100:after{content:'\20';position:absolute;z-index:3;right:1.1em;bottom:1.02em;width:1.56em;height:1.56em;background-color:#
<!doctype html>
<html>
<head>
<style>
body{padding-top:30px;background-color:#555a61;}
#progressbar{position:relative;z-index:1;margin:0 auto;width:20em;height:20em;background-color:#444a50;border-radius:10em;box-shadow:0 .1em .3em #3f444a inset;font-size:10px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);}
#progressbar:before{content:'\20';position:absolute;z-index:10;left:2em;top:2em;width:16em;height:16em;overflow:hidden;background-color:#555a61;border-radius:8em;box-shadow:0 .1em .3em #3f444a;}
#progressbar:after{content:'\20';position:absolute;z-index:9;left:2.85em;top:2.82em;width:1.6em;height:1.6em;background-color:#d9dbdb;border-radius:1.6em;}
s{position:absolute;left:.2em;top:.2em;border:1.6em solid;width:16.4em;height:16.4em;border-radius:10em;}
.p50,