Skip to content

Instantly share code, notes, and snippets.

View notwaldorf's full-sized avatar
🐱💻

Monica Dinculescu notwaldorf

🐱💻
View GitHub Profile
@notwaldorf
notwaldorf / index.html
Created June 6, 2022 18:19
Elle does a typing
<h1 class="message-wrapper" style="text-align:center;white-space:pre-wrap;">
<span>Work more</span>
<ul class="message">
<li><span>effectively</span></li>
<li><span>inclusively</span></li>
<li><span>sustainably</span></li>
<li><span>intentionally</span></li>
</ul>
<br>
<span>Live more fully.</span>
@notwaldorf
notwaldorf / README.md
Last active February 19, 2024 06:21
A very minimal p5.js polyfill for when you want to write basic p5.js code but not import the whole kitchen sink.

Minimal p5 polyfill

This is a very minimal bit of polyfill code for when you want to use some basic p5.js code you wrote, but not pay the performance cost associated with importing the whole kitchen sink.

It basically implements some of the sintactic sugar I use the most from p5.js but using the Canvas api, so that I have the p5 api but without all the magic I'm probably not using in this particular sketch.

@notwaldorf
notwaldorf / README.md
Last active June 7, 2023 00:21
ServiceWorker code to cache Tensorflow model shards.

ServiceWorker code to cache TensorFlow model shards.

One of the problems I have when testing giant TensorFlow models in TensorFlow.js is that they're huge (like 500 MB) and they take forever to download, every time I refresh the page. This is how I setup my ServiceWorker code so that at least in testing I only have to download the model once, and then it's saved in the cache for the next time.

@notwaldorf
notwaldorf / list.md
Last active January 13, 2024 11:09
Meownica's packing list

Meownica's packing list

I travel a lot so I'm down to like 30 minutes of packing per any kind of trip. I always bring one carry-on suitcase for any trips up to 2 weeks (that I never check in unless forced) -- I have an Away suitcase because it's got a built-in (removable) battery, and amazing wheels.

🚨

  • 🆔Wallet & Passport
  • 💧Travel water bottle
  • 💳Travel credit cards (don't pay foreign currency fees!)
  • 💳Insurance cards
  • 💵Local currency you have
  • 🚎Local public transport cards
@notwaldorf
notwaldorf / 👀.md
Last active February 18, 2024 21:13
Advice for new developers

Someone sent me an email asking me what advice I had for new developers. I get this question a bunch, so I wanted to put all my thoughts in one place, that I can update as I get more ideas!

I answered this a bunch on my AMA repo, so here's some initial general answers, before I get to some of the specific questions:

@notwaldorf
notwaldorf / things.md
Created September 21, 2015 23:01
A note on duplicate property names

The question was: "What's the best, if any, way to detect "conflicts" w/ CSS vars names between components?"

First, as a best-practice policy, on the elements team, we prefix custom properties with the element name, to make things clear: So paper-checkbox would have something like --paper-checkbox-checked-color etc.

Now, let's say that I have two identical elements, paper-checkbox and paper-checkbox-copy (in the sense that paper-checkbox-copy has all of paper-checkbox's custom variables, --paper-checkbox-checked-color and friends). If you style individual elements separately, even if the names are duplicate, the custom properties are scoped correctly. So in the example above, this will always do the right thing (because, remember: custom properties are scoped to their elements, and down their tree, they're not globally set)

paper-checkbox { 
  /* all paper-checkboxes instances always be blue */
  --paper-checkbox-unchecked-background-color: blue;
}
@notwaldorf
notwaldorf / index.html
Last active August 29, 2015 14:26
No `offsetParent` in the `attached` callback in Chrome
<!doctype html>
<html lang="en">
<head>
<title>offset parent demo</title>
<link rel="import" href="some-thing.html">
</head>
<body>
<some-thing></some-thing>
</body>
</html>
@notwaldorf
notwaldorf / borked-style.mm
Last active August 29, 2015 14:06
atom done gone crazy with the styles
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(windowWillClose:)
name:NSWindowWillCloseNotification
object:self.window];
@notwaldorf
notwaldorf / webkit-transition-opacity-bug
Last active August 29, 2015 14:05
Weird text jankiness when using a "transition: opacity" on a div
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<div id="box">
<div id="content">
CSS, right?
</div>