Copying folders into another folder (folder in folder):
cp -r css images js backups ar/
Note: this is different from copying just the contents themselves(contents of folders in folder):
cp -r css/ images/ js/ backups/ ar/
function queryString(name) { | |
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); | |
var r = window.location.search.substr(1).match(reg); | |
return r !== null ? decodeURIComponent(r[2]) : null | |
} |
Copying folders into another folder (folder in folder):
cp -r css images js backups ar/
Note: this is different from copying just the contents themselves(contents of folders in folder):
cp -r css/ images/ js/ backups/ ar/
.tip-mask { | |
z-index: 200; | |
position: fixed; | |
left: 0; | |
right: 0; | |
top: 0; | |
bottom: 0; | |
background-color: rgba(0, 0, 0, 0.4); | |
.update-tip { |
function getDomain(host) { | |
var a = host.split('.') | |
var s = a.slice(a.length - 2) | |
return '.' + s.join('.') | |
} | |
getDomain(location.host) |
https://stackoverflow.com/questions/12499728/create-png-jpg-file-with-commandline-on-mac
The command-line convert utility in the ImageMagick suite can easily create an image of specified dimensions:
convert -size 200x200 xc:white canvas.png
To create an image with text, use additional options:
convert -size 200x200 -gravity center -background white -fill black \
label:"text goes here" canvas.png
// parallel | |
await Promise.all([someCall(), anotherCall()]); | |
// error handle use promise | |
function foo() { | |
return bar(); | |
} | |
function bar() { | |
return Promise.reject(new Error('Uh oh!')); |
"fis": "fis3 release -d output -c",
"fisprod": "fis3 -f fis-conf-prod.js release -d outputprod -c",
fis.set('query', 't=' + Date.now())
//当设置使用编译缓存,每个文件的编译结果均会在磁盘中保存以供下次编译使用
fis.match('::image', {
query: '?'+fis.get('query'),
// 开发
// domain: "https://n.static.dwtv.tv/h5/gameshell",
// 测试
{"sig":"36fae7d8c5889ae8228a67a7ee61912577572cc2a9ac9fc78eb056784e2f5e3c2af9d36d8a0fe62425f2306ff40d79eafab6540f9c797365468fbaf85cda0af50","msghash":"2624ef445a7baa5241221dfa2d2fac7d83b7fd4de3a926fd27294f042737b572"} |
nohup bash -c "(time ./script arg1 arg2 > script.out) &> time_n_err.out" &