- https://github.com/opencollective/opencollective-frontend
@formatjs/intl-relativetimeformat
@material-ui/core
@opencollective/taxes
@rebass/grid
@sentry/browser
@sentry/node
@styled-icons/boxicons-regular
@styled-icons/fa-brands
@styled-icons/fa-solid
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
# Inspired from https://github.com/cvan/dotfiles/blob/f21e950/.aliasrc#L26-L48 | |
alias gco='git checkout' | |
alias gg='git get' | |
alias gb='git branch' | |
alias ga='git add' | |
alias gd='git diff' | |
alias gs='git status' | |
alias gst='git stash' | |
alias gsta='git stash apply' |
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
// Remixed from original source: https://gist.github.com/MoOx/93c2853fee760f42d97f | |
// | |
// 1. Go to a GitHub Labels page. (e.g., https://github.com/cssnext/cssnext/labels) | |
// 2. Open your Dev Tools' Console and paste this script. | |
// 3. Now you have a dump of your labels. | |
// | |
// P.S. The JSON output can be later imported using a tool using https://github.com/popomore/github-labels | |
labels = []; | |
Array.prototype.forEach.call(document.querySelectorAll('.Box-row a[class^=IssueLabel]'), el => { |
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
str = ''; for (let i = 0 ; i <= 100 ; i += 5) { str+=` '${i}': '${i}%,'\n`; } | |
copy(str); | |
/* | |
Output: | |
'0': '0%', | |
'5': '5%', | |
'10': '10%', |
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
cat out/**/*.css | ./node_modules/.bin/prettier --stdin-filepath abc.css | pbcopy |
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
copy(Object.keys(x).sort().map(i => ` - \`${i}\``).join('\n') + '\n') |
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
% git diff master..head --name-only | |
icon.svg | |
index.html | |
package.json | |
package-lock.json | |
% git diff master..head |
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
// Source: https://twitter.com/jasnell/status/1233135311959445504 | |
// | |
// PSA: Did you know that since Node.js 11.0.0 there's been a built-in mechanism for monitoring event loop delay? | |
const { monitorEventLoopDelay } = require('perf_hooks'); | |
const h = monitorEventLoopDelay({ resolution: 20 }); | |
h.enable(); |
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
(() => { | |
const width = window.outerWidth / 2; | |
const height = window.outerHeight / 2; | |
const top = 0; | |
const left = width * 3; | |
const popupEl = window.open('http://example.com', 'preview', `height=${height},width=${width},scrollbars=yes,left=${left},top=${top}`); | |
popupEl.focus(); | |
})(); |
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
// Source: adapted from https://stackoverflow.com/a/48161723 | |
// This returns a SHA-256-hashed string. | |
function sha256(message) { | |
// Encode as UTF-8. | |
const msgBuffer = new TextEncoder('utf-8').encode(message); | |
if (typeof window !== 'object' || !window.crypto) { | |
return Promise.resolve(null); | |
} |