This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rid9\.datetime { | |
position: fixed; | |
top: 85px; | |
right: 105px; | |
font-size: 75px; | |
color: red; | |
line-height: 1.4 !important; | |
height: unset !important; | |
font-family: 'M+ 1m', 'Hack'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gradient = require('gradient-string') | |
const figlet = require('figlet') | |
console.log( | |
gradient.rainbow( | |
figlet.textSync('Hello World !', { | |
font: 'Standard', | |
horizontalLayout: 'full', | |
}) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 初始的 filter | |
*/ | |
export function initialFilter({ map, list }) { | |
list.forEach(item => setBox({ map, item })) | |
let i = 0 | |
while (i < list.length) { | |
let prev = list.slice(0, i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const i = yargs | |
.usage('$0 -u <url> [options]') | |
.option('url', { | |
alias: 'u', | |
describe: '专辑/歌单 url', | |
required: true, | |
type: 'string', | |
}) | |
.option('concurrency', { | |
alias: 'c', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const fs = require('fs') | |
const _ = require('lodash') | |
const onecolor = require('onecolor') | |
const gd = require('node-gd') | |
// https://github.com/y-a-v-a/node-gd/blob/master/docs/index.md | |
// Set full path to font file | |
const fontpath = __home + '/files/fonts/arial.ttf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* http://v2ex.com/t/271065 | |
* http://www.kuaidadi.com/assets/js/animate.js | |
* | |
* ES6 环境可用 | |
* babelify: regenerator 到ES5可用。 | |
*/ | |
const pify = require('promise.ify').noerr; | |
const cowrap = require('co').wrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = parse | |
function parse(s) { | |
s = s.replace(/'/g, "\'") | |
.replace(/"/g, '\"') | |
.replace(/\n/g, '\\n') | |
.replace(/\r/, '\\r') | |
var code = "return " + s | |
var f = new Function(code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
require -> Module.prototype.require -> Module.load(request,module) | |
require.reslove -> Module._resolveFilename(request, module); | |
*/ | |
var Module = module.constructor | |
Module.prototype._require = function(request) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.prototype.hash1 = function(string) { | |
var code = "try{ return this."+ string +" } catch(e){ return undefined }" | |
return (new Function(code)).call(this); | |
}; | |
var test = { | |
'a':{ | |
'b':{ | |
'c':{ |
NewerOlder