国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
var DOMTokenListSupports = function(tokenList, token) { | |
if (!tokenList || !tokenList.supports) { | |
return; | |
} | |
try { | |
return tokenList.supports(token); | |
} catch (e) { | |
if (e instanceof TypeError) { | |
console.log("The DOMTokenList doesn't have a supported tokens list"); | |
} else { |
/* | |
* Code snippet for posting tweets to your own twitter account from node.js. | |
* You must first create an app through twitter, grab the apps key/secret, | |
* and generate your access token/secret (should be same page that you get the | |
* app key/secret). | |
* Uses oauth package found below: | |
* https://github.com/ciaranj/node-oauth | |
* npm install oauth | |
* For additional usage beyond status updates, refer to twitter api | |
* https://dev.twitter.com/docs/api/1.1 |
var Ajax = (function() { | |
var methodsList = ['get', 'post', 'head', 'options', 'put', 'connect', 'trace', 'delete']; | |
/** | |
* Ajax | |
* @param {String} url | |
* @param {Function} callback | |
* @param {Object/String} data | |
* @param {Object} options | |
* |
const http = require('http') | |
const url = require('url') | |
const path = require('path') | |
const fs = require('fs') | |
const mime = { | |
"html": "text/html", | |
"css": "text/css", | |
"js": "text/javascript", | |
"json": "application/json", | |
"gif": "image/gif", |
//Shashank Duhan 2017 | CC.0 | |
//You gonna need reflex.js for this : | |
// https://gist.github.com/shashankduhan/673a4e1223afe550ca69958bcb73181c | |
window.router = (()=>{ | |
"use strict" | |
return { | |
state: 0, | |
init: function(user){ | |
router.routes = router.state; | |
window.addEventListener("hashchange", router.router); |
// Mobile project scss utils. | |
// https://gist.github.com/overtrue/56561fd4b124b9ffe5048ef06752d4bf | |
// Space | |
// | |
$spacer: 12px !default; | |
@each $prop, $abbrev in (margin: m, padding: p) { | |
@for $size from 0 to 10 { | |
$value: #{$size * $spacer}; |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized