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
export function logger(...arg){ | |
let parrent = new Error() | |
.stack | |
.split("\n")[2] | |
.trim() | |
.replace(/^at /, '') | |
.replace(__dirname, '') | |
let log = arg.forEach(e=>{ e = typeof e === 'string' ? e : JSON.stringify(e, null, 4)}).join(' ') | |
return log | |
} |
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
import * as _vue from "./vue"; | |
declare global { | |
const Vue: typeof _vue.Vue; | |
} |
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.repeatWord = (length) => _char => Array.from({ length }, e => _char).join('') | |
module.exports.range = (length, start = 0) => Array.from({ length }, (_, i) => i + start) | |
module.exports.zeroAdd = (length, str) => (repeatWord(length)('0') + str).slice(length * -1) |
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
function sequenceTasks(tasks) { | |
function recordValue(results, value) { | |
results.push(value); | |
return results; | |
} | |
var pushValue = recordValue.bind(null, []); | |
return tasks.reduce(function (promise, task) { | |
return promise.then(task).then(pushValue); | |
}, Promise.resolve()); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Document</title> | |
<style> | |
#nav-check { | |
display: none; |
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
// <![CDATA[ <-- For SVG support | |
if ('WebSocket' in window) { | |
(function () { | |
function refreshCSS () { | |
var sheets = [].slice.call(document.getElementsByTagName("link")); | |
var head = document.getElementsByTagName("head")[0]; | |
for (var i = 0; i < sheets.length; ++i) { | |
var elem = sheets[i]; | |
head.removeChild(elem); |
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
{ | |
"link": { | |
"self": { | |
"href": "/order" | |
}, | |
"cancel": { | |
"method": "delete", | |
"href": "/order/cancel/{id}" | |
}, | |
"change": { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> | |
.card { |
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 path = require('path') | |
const ImageminPlugin = require('imagemin-webpack-plugin').default | |
function resolve (dir) { | |
return path.join(__dirname, dir) | |
} | |
let externals = {} | |
let plugins = [] | |
if (process.env.NODE_ENV === 'production') { | |
// 外部有引入cdn的話 | |
externals = { |
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
// ==UserScript== | |
// @name New script - github.com | |
// @namespace Violentmonkey Scripts | |
// @match https://github.com/* | |
// @grant none | |
// @version 1.0 | |
// @author [email protected] | |
// @description 12/9/2019, 5:20:26 PM | |
// ==/UserScript== | |
if (document.querySelector('#readme article')) { |