Skip to content

Instantly share code, notes, and snippets.

View jgierer12's full-sized avatar

Jonas Gierer jgierer12

View GitHub Profile
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title><![CDATA[Kent C. Dodds]]></title>
<description><![CDATA[Come check out how Kent C. Dodds can help you level up your career as a software engineer.]]></description>
<link>https://kentcdodds.com</link>
<generator>RSS for Node</generator>
<lastBuildDate>Fri, 19 Jul 2019 20:25:23 GMT</lastBuildDate>
<item>
<title><![CDATA[When to break up a component into multiple components]]></title>
{
"editor.fontFamily": "'Dank Mono'",
"editor.fontLigatures": true,
"terminal.integrated.fontFamily": "'Dank Mono'",
"terminal.integrated.fontSize": 16,
"editor.fontSize": 18,
"editor.renderLineHighlight": "gutter",
"editor.renderWhitespace": "boundary",
"extensions.autoUpdate": true,
"window.menuBarVisibility": "toggle",
@jgierer12
jgierer12 / postcss.config.js
Created March 31, 2018 21:30
Minimal CSS Modules + PostCSS webpack config
module.exports = {
plugins: {
'postcss-cssnext': {},
// other plugins (https://github.com/postcss/postcss#plugins)
'cssnano': {}
}
}
[user]
name = Jonas Gierer
email = my@email.com
signingkey = 0123456789ABCDEF
[core]
excludesFile = path/to/.gitignore
editor = code --wait --new-window
autocrlf = false
eol = lf
@jgierer12
jgierer12 / codepan.json
Created January 27, 2018 12:06
Try it online! codepan.net/gist/ca0f1001fa2a0920f892fa754e600653
{
"showPans": [
"js",
"output"
],
"activePan": "js"
}
.mtki {
/* Enable Cartograph Mono CF font features */
font-feature-settings: 'ss01' on;
}
const View = ({ loading, error, ...otherProps }) => (
<div>
{(() => {
if (loading) {
return <Loading />
} else if (error) {
return <Error error={error} />
} else {
return <MyLoadedComponent {...otherProps} />
};
let clicked = false;
// `mousedown` always seems to fire before `focusin`.
// (But within the same millisecond).
document.addEventListener('mousedown', () => {
clicked = true;
setTimeout(() => clicked = false, 1);
});
// `focusin` is the bubbling version of `focus`.
const gcd = (x, y) => y ? gcd(y, x % y) : x;
const simplify = xs => xs.map(x => x / gcd(...xs));
export default str => simplify(str.split(' ')).join(' ');
export default arr => arr.some(x => arr.includes(-x));