This file contains hidden or 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 { remark } from 'remark'; | |
import path from 'path'; | |
import fs from 'fs/promises'; | |
import { selectAll } from 'unist-util-select'; | |
import { glob } from 'glob'; | |
import { createWriteStream } from 'fs'; | |
import { pipeline } from 'stream/promises'; | |
import { request } from 'undici'; | |
import { pinyin } from 'pinyin-pro'; |
This file contains hidden or 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('intelli-espower-loader'); | |
require('./test/foo.test.js'); |
This file contains hidden or 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
/** | |
* 15位身份证转换为18位 | |
* | |
*/ | |
function getIdCardNumber18(idCardNumber){ | |
if (!idCardNumber) { | |
return null; | |
} | |
// 转换为字符串 | |
idCardNumber = '' + idCardNumber; |
This file contains hidden or 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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or 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 count(m, n){ | |
if (n < m) return; | |
var mod = Math.floor( n / m) | |
var rem = n % m | |
var number = 1 | |
var paths = [] |
This file contains hidden or 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
#!/bin/bash | |
FROM=gbk | |
TO=UTF-8 | |
ICONV="iconv -f $FROM -t $TO" | |
# Convert | |
find . -type f -name "*" | while read fn; do | |
cp ${fn} ${fn}.bak | |
$ICONV < ${fn}.bak > ${fn} | |
rm ${fn}.bak | |
done |
This file contains hidden or 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
#!/usr/bin/env node --harmony | |
var fs = require('fs') | |
var path = require('path') | |
var co = require('co') | |
var thunkify = require('thunkify') | |
var cwd = process.cwd() | |
var file = path.join(cwd, 'templates') | |
var dir = thunkify(fs.readdir) |
This file contains hidden or 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
velocity.js joycss plum peersay kissy-gallery |
This file contains hidden or 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
{ | |
"status": false, | |
"message": "错误提示" | |
} |
This file contains hidden or 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
/* 后端数据 */ | |
var data = { | |
"10;20;30": { | |
price: 5, | |
count: 1 | |
}, | |
"10;20;31": { | |
price: 10, | |
count: 2 | |
}, |
NewerOlder