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
export default function range(_start, _end) { | |
// If only one argument (n) is passed, we generate a range from 0 to n. | |
const start = typeof _end === 'undefined' ? 0 : _start; | |
const end = typeof _end === 'undefined' ? _start : _end; | |
// "direction" multiplier to produce a decreasing sequence if `start` is greater than `end`. | |
const direction = start > end ? -1 : 1; | |
const size = Math.abs(end - start) + 1; |
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
/** | |
* BREAKPOINTS THRESHOLDS | |
*/ | |
:root { | |
--breakpoint-threshold--mobile: 22em; /* Roughly, a min-width for handsets */ | |
--breakpoint-threshold--small: 30em; /* Roughly, a max-width for handsets in landscape */ | |
--breakpoint-threshold--medium: 49.125em; /* Roughly, a min-width for tablets */ | |
--breakpoint-threshold--large: 64em; /* Roughly, a max-width for tablets in landscape */ | |
--breakpoint-threshold--xLarge: 90em; /* Someone probably has a monitor 💻 */ | |
} |
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 { floor, random } = Math; | |
function boundedRandom(min, max) { | |
const spread = max - min; | |
return min + floor(random() * spread); | |
} |
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
:root { | |
/* --------------- THEME COLORS --------------- */ | |
--theme-color__primary: #9D6D45; | |
--theme-color__primary--light: #AA764B; | |
--theme-color__primary--dark: #1D140D; | |
--theme-color__supporting-1: #56ee9d; | |
--theme-color__supporting-1--light: #99FBC7; |
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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
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
#include <cstdlib> | |
int boundedRandom(int min, int max) { | |
static const double randFraction = 1.0 / (static_cast<double>(RAND_MAX)); | |
int offset = (max - min + 1) * (rand() * randFraction); | |
return min + offset; | |
} |
OlderNewer