Skip to content

Instantly share code, notes, and snippets.

Avatar
⚛️
design + code

Mike Skowronek coderitual

⚛️
design + code
View GitHub Profile
View cascade-layers.md

Cascade Layers, a Proposal

A syntax proposal for Cascade Layers #4470. This does not include full discussion of the Cascade Layer purpose and use-cases, which can be found in the various linked issues, but attempts to answer many of the outstanding questions about how we might implement a layering feature.

Collaborators:

  • Elika Etemad
  • Florian Rivoal
  • Miriam Suzanne
  • Tab Atkins Jr.
@bvaughn
bvaughn / useSubscription-and-useMutableSource.md
Last active Mar 29, 2021
`useSubscription` and `useMutableSource` tearing and deopt behavior.
View useSubscription-and-useMutableSource.md

useSubscription and useMutableSource1 tearing and deopt behavior.

Mounting a new tree

The tree below represents a React application mounting. During mount, two components read from an external, mutable source. The first one (List) reads version 1 of that data and the second one (Item) reads version 2.

Deopt

useSubscription (legacy mode)

N/A.

@matthewmayer
matthewmayer / whatthefont.js
Last active Jul 10, 2020
paste this into Javascript console to see what fonts are being used
View whatthefont.js
function walk(node) {
// I stole this function from here:
// http://is.gd/mwZp7E
var child, next;
var tagName = node.tagName ? node.tagName.toLowerCase() : "";
if (tagName == 'input' || tagName == 'textarea') {
return;
}
@rostok
rostok / gard-grass-1.p8
Created Sep 4, 2019
Initial version of "Evening summer breeze" tweetcart
View gard-grass-1.p8
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
-- make it 400 bytes long
k={1,2,4,8,9,10,7}
-- k={9,9,9,9,10,10,7}
-- k={0,5,6,7,15,14,8,2,4,9,10,11,3,12,13}
-- k={0,0,0,0,0,1,1,1,1,12,12,7}
-- k={5,6,15,9,7}
s=sin
@dariusz-wozniak
dariusz-wozniak / excel-functions-pl-en.csv
Last active Jan 13, 2019
📊 Tłumaczenia funkcji w Excelu polski <> angielski
View excel-functions-pl-en.csv
PL EN
ATANH ATANH
ATAN2 ATAN2
ATAN ATAN
ASINH ASINH
ASIN ASIN
ASC ASC
ARKUSZE SHEETS
ARKUSZ SHEET
ARG.LICZBY.ZESP IMARGUMENT
@necolas
necolas / using-OnLayout.js
Last active Sep 23, 2020
React Pressable / OnLayout
View using-OnLayout.js
/**
* OnLayout is built upon: View (and ResizeObserver), StyleSheet
*/
const elementBreakpoints = {
small: { minWidth: 200 },
medium: { minWidth: 300 }
large: { minWidth: 500 }
};
View for-snook.md

https://twitter.com/snookca/status/1073299331262889984?s=21

‪“‬In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”

‪Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows. ‬

‪(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)‬

So the big deal about css-in-js (cij) is selectors.

View es6-feature-detection.js
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
View Effective_Engineer.md

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@ebidel
ebidel / fancy-tabs-demo.html
Last active May 11, 2021
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
View fancy-tabs-demo.html
<script>
function execPolyfill() {
(function(){
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1.
/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt