Skip to content

Instantly share code, notes, and snippets.

View dannycroft's full-sized avatar

Danny Croft dannycroft

View GitHub Profile
@dannycroft
dannycroft / npm-audit-high.sh
Created July 1, 2019 15:53
Show only High severity problems with npm audit
npm audit | grep -B 1 -A 10 High
const isWebpSupported = () =>
new Promise((resolve, reject) => {
const img = new Image();
img.onload = () => resolve(true);
img.onerror = () => reject(false);
img.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=';
});
isWebpSupported().then(console.log).catch(console.error)
@dannycroft
dannycroft / proposal-template.md
Created July 13, 2022 08:19
Proposal Template

What problem are you trying to solve?

  • Introduce the problem statement here. This might be well-defined ('we need to tweak the parameter of a rule from X to Y to help reduce a certain type of abuse'), or more fuzzy ('we need to invest more in paying back technical debt').
  • Focus on the underlying problem that needs to be solved, as opposed to jumping to how you will solve it.

Why should we solve it?

  • Why is this an important problem for us to solve?
  • Is it a big enough problem to solve?
  • Should we solve it now, or later?
  • Provide specific data (quantitative or qualitative) wherever possible.