- Keycap: [Plastic outer covering][keycaps] of a particular key typically inscribed with the character that gets sent to the computer when struck.
- PCB: Printed Circuit Board (really, just a circuit board), which registers keystrokes and sends them to the computer.
- Switch: underlying mechanism that the keycap covers, and in some way creates contact with the PCB to let it know that a keystroke needs
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 juxtMerge = (fnList) => compose( | |
mergeAll, | |
juxt(fnList) | |
); | |
// given an object, a foreignKey (name), and a lookup object | |
// containing data keyed to the foreignKey, | |
// return the data of the lookup, or a fallback value | |
const propOfPropOr = (fallback, foreignKey, lookup) => (item) => propOr( | |
fallback, |
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 eq = (a) => (b) => a === b; | |
const everyItemEquala = compose( | |
apply(all), | |
juxt([compose(equals, head), identity]) | |
); | |
const everyItemEqualb = compose( | |
equals(1), | |
length, |
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 filterOperations = { | |
eq: equals, | |
neq: complement(equals), | |
lt: gt, | |
gt: lt, | |
lte: gte, | |
gte: lte, | |
includes: includes, | |
} |
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 data = {'a.b': 1, 'c.d': 7, 'c.d': 9} | |
const assocPathDataLast = curry( | |
(mergeAble, pathList, val) => assocPath(pathList, val, mergeAble) | |
); | |
const processKeys = compose( | |
split('.'), | |
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
const clamp = (min, max, x) => Math.min(Math.max(x, min), max); | |
const clmp = (minVal, maxVal) => compose( | |
min(maxVal), | |
max(minVal) | |
); |
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 data1 = [ | |
{id: 1, status: true}, | |
{id: 2, status: false}, | |
{id: 3, status: true}, | |
]; | |
const data2 = [ | |
{id: 1, status: true}, | |
{id: 2}, | |
{id: 3, status: true}, |
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
// Given a value with a unit | |
// return the value without the unit | |
@function strip-unit($item) { | |
@if type-of($item) == 'number' and not unitless($item) { | |
@return $item / ( $item * 0 + 1 ); | |
} | |
@return $item; | |
} |
I hereby claim:
- I am dinocarl on github.
- I am dinocarl (https://keybase.io/dinocarl) on keybase.
- I have a public key ASDKE0ZRqX9N0qWa_W_hgF_DGsLmbgaWta9UtVWiQUAV2go
To claim this, I am signing this object:
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
// meta-programming part | |
@mixin dynamicallyAvailableExtend($placeholder) { | |
%#{$placeholder} { | |
@content; | |
} | |
} | |
@mixin extend($placeholders...) { | |
@each $placeholder in $placeholders { | |
@extend %#{$placeholder}; |