Skip to content

Instantly share code, notes, and snippets.

View rafegoldberg's full-sized avatar
🙃

Rafe Goldberg rafegoldberg

🙃
View GitHub Profile
@rafegoldberg
rafegoldberg / hashed-class-search.js
Last active February 9, 2024 18:57
find projects using hashed classes in their Custom CSS
/**
* Find and list every hashed class being used in our projects' Custom CSS
* @usage npx ts-node bin/custom-css-search.js
* @option --dataset=[classes|project]
* @note you can pipe the output directly in to a file using `tee`:
* `... | tee custom-css-usage.json >/dev/null`
*/
try {
require('dotenv').config(); // eslint-disable-line global-require
@rafegoldberg
rafegoldberg / about.nyt-dark-mode-css.md
Last active March 18, 2024 04:13
New York Times Dark Mode

NYT Dark Mode CSS

@rafegoldberg
rafegoldberg / VSCode Workspace Settings.md
Last active July 6, 2020 00:56
Baseline workspace settings file for Node projects.

VSCode Settings

Baseline workspace settings file for Node projects.

@rafegoldberg
rafegoldberg / filled-array.js
Last active January 28, 2019 16:55
New Array Filled Randomly (Javascript)
let
set = [...Array(40)].map(e=> ~~(Math.random()*40))
@rafegoldberg
rafegoldberg / flexible-grid-generator.css
Last active January 13, 2021 14:27
Flexible CSS Grid Generator
.grid {
display: grid;
grid-template-columns: repeat(
auto-fill,
minmax(15rem, 1fr)
);
grid-gap: 1rem;
}
@rafegoldberg
rafegoldberg / about.silent-sass-extension.md
Last active January 13, 2021 15:33
A Sass @mixin to generate silent extension class patterns.

Silent Sass Extension

Running this Gist through Sass should generate the following output:

.underridden { // $XELIDE: true !default
  color: magenta;
}
@rafegoldberg
rafegoldberg / .gitconfig
Created October 26, 2017 13:22 — forked from rab/.gitconfig
A good starting point for ~/.gitconfig
# -*- Conf -*-
[color]
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or