This file contains 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 isSafari = // ... | |
function getIsSupported(src) { | |
return new Promise((resolve) => { | |
const image = new Image(); | |
image.onload = () => { | |
const isSupported = image.width > 0 && image.height > 0; | |
resolve(isSupported); | |
}; |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<title>GitHub Actions dashboard</title> | |
<style> | |
:root { | |
font-size: 14px; | |
--background-color: rgb(246 248 250); | |
--canvas-background-color: rgb(255 255 255); | |
--canvas-border-color: rgb(216 222 228); | |
--canvas-shadow: rgba(140 149 159 / 15%) 0 3px 6px 0; |
This file contains 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
# Create tsconfig.json | |
echo "{ | |
\"compilerOptions\": { | |
\"declaration\": true, | |
\"esModuleInterop\": true, | |
\"isolatedModules\": true, | |
\"moduleResolution\": \"node\", | |
\"outDir\": \"dist\", | |
\"strict\": true | |
}, |
This file contains 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 pattern = /_/g; | |
function addWordBreaks(text) { | |
const splitText = text.split(pattern); | |
if (splitText.length <= 1) { | |
return text; | |
} | |
const matches = text.match(pattern); |
This file contains 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 fetch | |
git checkout main | |
git pull | |
git checkout -b prettier | |
yarn add eslint@^8.5.0 eslint-config-wojtekmaj prettier@^2.5.0 --dev | |
yarn dedupe | |
echo "{ | |
\"printWidth\": 100, | |
\"singleQuote\": true, |
This file contains 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 fetch | |
git checkout main | |
git pull | |
git checkout -b husky | |
yarn add @commitlint/config-conventional @commitlint/cli husky@^7.0.0 --dev | |
yarn dedupe | |
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js | |
# if you're on windows, check EOL sequence in the file created | |
yarn husky install |
This file contains 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
Enrico Fermi | |
Cecilia Payne-Gaposchkin | |
Gertrude B. Elion | |
Patricia S. Goldman-Rakic | |
Łucja Światowska | |
Francisca de Oliveira | |
Ada María Guerrero de Hernández | |
侯既明 | |
شیرین مینایی |
This file contains 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 pattern = /https?:\/\/[^\s]*/g; | |
function formatLink(url, props) { | |
if (!url) { | |
return ''; | |
} | |
let host; | |
let pathname; |
This file contains 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
.react-calendar { | |
.rounded-corners(); | |
width: 350px; | |
max-width: 100%; | |
background: white; | |
font: inherit; | |
line-height: 1.125em; | |
border: 0; | |
overflow: hidden; |