Skip to content

Instantly share code, notes, and snippets.

@fredroo
fredroo / digitalocean-promo-code-february-march-april-2026.md
Last active December 19, 2025 09:03
DigitalOcean Promo Code 2026 - FREE $200 CREDIT for January / February / March / April / May / June / July / August / September / October / November / December 2026

DigitalOcean Promo Code 2026 for January, February, March, April, May, June, July, August, September, October, November, and December of 2026

Linked Image

Save $200 for your Cloud Computing Solution with DigitalOcean.

How to get the Discount?

1.) Use this link to Sign Up and save your first $200.

@ellsies
ellsies / Crossover.sh
Last active January 11, 2026 04:03
Crackover (Complete free version of crossover)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@gaearon
gaearon / modern_js.md
Last active January 11, 2026 02:45
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@gaearon
gaearon / quiz.md
Last active January 11, 2026 02:45

A top-level App component returns <Button /> from its render() method.

  1. What is the relationship between <Button /> and this in that Button’s render()?

  2. Does rendering <Button><Icon /></Button> guarantee that an Icon mounts?

  3. Can the App change anything in the Button output? What and how?


@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 11, 2026 02:45
React (Virtual) DOM Terminology
@sebmarkbage
sebmarkbage / QuizAnswer.md
Last active January 11, 2026 02:45
Global Shared [Synchronous] State

setProps - depends on reading the last reconciled props from the current reconciled state of the app, at the time of the call. It also depends on an object that doesn't necessarily need to be there outside reconciliation. This is unlike setState, which is state that needs to be there. setState is queued up and merged at the time of reconciliation. Not at the time of the call. setState has a side-effect but is not a stateful nor mutative API.

isMounted - reads the current state of the tree, which may be stale if you're in a batch or reconciliation.

getDOMNode/findDOMNode - Reads the currently flushed node. This currently relies on the state of the system and that everything has flushed at this time. We could potentially do a forced render but that would still rely on the state of the system allowing us to synchronously being able to force a rerender of the system. Note: in 0.14, refs directly to DOM node will resolve to the DOM node. This allow you to get access to a node at the time of its choos

@sebmarkbage
sebmarkbage / WhyReact.md
Created September 4, 2019 20:33
Why is React doing this?

I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.

I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.

"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr

@nicoelayda
nicoelayda / geforce-now-on-cachyos-handheld-edition.md
Last active January 11, 2026 02:45
Steps for setting up the native NVIDIA GeForce NOW app on CachyOS Handheld Edition.

Installing GeForce NOW on CachyOS Handheld Edition

These steps were tested on an ASUS ROG Xbox Ally X with the November 2025 release of CachyOS Handheld Edition.

Requirements

Preparation

Disable or configure KDE Wallet.