Skip to content

Instantly share code, notes, and snippets.

View MichaelDanilov's full-sized avatar

Michael Danilov MichaelDanilov

View GitHub Profile
@hyperupcall
hyperupcall / settings.jsonc
Last active January 8, 2025 13:29
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@rstacruz
rstacruz / README.md
Last active January 22, 2025 22:06
Setting up Jest with ESM

Setting up Jest with ESM

Here are some different ways on how to set up Jest to support ESM. This applies for Jest v25, Node v13, and Babel v7.

Method A: Native Node.js support

Node v14 and Jest v26 support ESM natively with the --experimental-vm-modules flag.

Install cross-env:

tap "ethereum/ethereum"
tap "heroku/brew"
tap "homebrew/boneyard"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "paritytech/paritytech"
cask "java"
brew "ansible"
@swalkinshaw
swalkinshaw / tutorial.md
Last active February 26, 2025 21:15
Designing a GraphQL API
@bvaughn
bvaughn / react-lifecycle-cheatsheet.md
Last active October 8, 2024 15:46
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
Mounting
componentWillMount Constructor equivalent for createClass
render Create and return element(s)
componentDidMount DOM manipulations, network requests, etc.
Updating
componentWillReceiveProps Update state based on changed props
@wesbos
wesbos / gist:0d5572a29e4f5688a1c8
Last active September 1, 2023 17:59
Handy list of widths to target in a responsive website
320
321
322
323
324
325
326
327
328
329
@paulirish
paulirish / what-forces-layout.md
Last active March 15, 2025 16:10
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@bobuk
bobuk / interstellar.md
Last active April 3, 2022 10:01
Interstellar review

Интерстеллар: Наука за кадром

Ребята из "Манн, Иванов и Фербер" дали мне почитать перевод книги Кипа Торна "The Science of Interstellar". Читать ее на английском мне было откровенно слабО, но перевод не подкачал.

Вообще, стоит сказать - книга не только (и не столько) о фильме, но и, на самом деле, об устройстве мира. Часто встречающиеся в фантастических рассказах или популярных статьях понятия объяснены для тупиц вроде меня, доступным языком. При этом автору удалось удержаться от примитивных ничего не объясняющих фраз, что, согласитесь, здорово.

Книга читается достаточно легко еще и за счет того, что научные объяснения в ней лежат не в виде тупо фактов - тут, знаете ли, есть сюжет. Вся книга это история создания фильма и общения между его создателями. Я не большой фанат картины, на мой взгляд это была не самая крутая работа Ноллана, но читать о том, как строится сюжет было очень интересно. С удивлением узнал что Ноллан умеет не только _