获取浏览器上的querystring

1
2
3
4
5
const getQuery = key =>
location.search.substr(1).split('&')
.map(x => x.split('='))
.filter( ([k]) => Array.isArray(key) ? key.includes(k):k=== key)
.reduce((r, [k,v]) => Array.isArray(key) ? Object.assign(r || {},{[k]:v}): v, null)

ssh config file

快速配置ssh config,从此无痛快速连接服务器

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

1
sudo chown R $USER /usr/local

不匹配后面字符

1
'Project boards bcarcs for your issues and pull requests'.match(/(\w+ar(?!d)[^\s]*)/g)
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×