This little guide describes what to do when:
- You see a vulnerability warning for a package, and
- The package has already been fixed, and a patch version has been released.
- Delete all lock files
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
const replace = async (input, regex, replacer) => { | |
// we need to remove the 'g' flag, if defined, so that all replacements can be made | |
let flags = (regex.flags || '').replace('g', ''); | |
let re = new RegExp(regex.source || regex, flags); | |
let index = 0; | |
let match; | |
while ((match = re.exec(input.slice(index)))) { | |
let value = await replacer(...match); | |
index += match.index; |
const cmds = { linux: 'xdg-open', win32: 'start', darwin: 'open' }; | |
const open = cmds[process.platform]; | |
const tryOpen = (dirname, editors = ['sublime', 'code', open]) => { | |
try { | |
cp.execSync([editors[0], dirname].join(' ')); | |
console.log('Opening in ' + editors[0]); | |
} catch (err) { | |
if (editors.length === 0) { | |
throw new Error('Cannot find an editor to open'); |
const cp = require('child_process'); | |
const Koa = require('koa'); | |
const app = new Koa(); | |
const cmds = { linux: 'xdg-open', win32: 'start chrome', darwin: 'open' }; | |
const open = cmds[process.platform]; | |
const PORT = 3000; | |
// response | |
app.use(ctx => { | |
ctx.body = 'Hello Koa'; |
This little guide describes what to do when:
/** | |
* This variant takes a max depth as the second argument. | |
*/ | |
const permutations = (value, max = value.length) => { | |
let depth = Math.min(max, value.length); | |
let results = []; | |
const permute = (queue = []) => { | |
if (queue.length === depth) { |
Thanks for choosing to contribute to Enquirer! We're so happy that you're contributing to open source projects, and we're even happier that one of those projects is ours!
There is no faster, more effective way to improve a product than from the feedback from the first experience of a new user -- Jon Schlinkert
curl -s https://api.github.com/users/<USERNAME>/repos?per_page=100 | ruby -rjson -e 'JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["clone_url"]} ]}' |
const compile = (input, helpers, thisArg) => { | |
return async data => { | |
let ctx = { ...thisArg, ...data }; | |
let keys = []; | |
let vals = []; | |
if (helpers) { | |
for (let key of Object.keys(helpers)) { | |
if (ctx[key] === void 0) { | |
ctx[key] = (...args) => helpers[key].call(ctx, ...args); |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.13333329558372498</real> |