Skip to content

Instantly share code, notes, and snippets.

View Sparragus's full-sized avatar
🛠️
Follow me on twitter: https://twitter.com/sparragus

Richard B. Kaufman-López Sparragus

🛠️
Follow me on twitter: https://twitter.com/sparragus
View GitHub Profile
// I've only used this for focus management, I'm willing to bet you don't
// actually want to do this unless it's focus management
function useUpdateEffect(effect, deps) {
let mounted = useRef(false)
useEffect(() => {
if (mounted.current) {
return effect()
} else {
mounted.current = true
@vasanthk
vasanthk / System Design.md
Last active November 6, 2024 07:42
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@pushmatrix
pushmatrix / wordlist
Last active January 1, 2022 09:38
Complete Swedish Duolingo word list (as of March 15, 2015)
man
kvinna
är
pojke
flicka
jag
en
han
hon
ett
@bobbygrace
bobbygrace / trello-css-guide.md
Last active November 3, 2024 14:56
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

// by Dave @ beesandbombs >:)
int[][] result;
float time;
void setup() {
setup_();
result = new int[width*height][3];
}
//configurable variables
boolean
exportMode = true; //set to true when exporting, false when designing
String
folderPrefix = "b";
int
fps = 24,
outputScale = 2, //set to 2 or 4 when exporting, 1 when designing
windowSize = 480 * outputScale,