Skip to content

Instantly share code, notes, and snippets.

View kino90's full-sized avatar
🍪
Come to the Dark Side.. We have Cookies!

Luca Maroni kino90

🍪
Come to the Dark Side.. We have Cookies!
View GitHub Profile
@threepointone
threepointone / alternative.md
Last active July 31, 2022 17:46
list of things that don't do what they say they do

(also know as lies and/or alternative facts)

js

  • setImmediate - doesn't set anything immediately, waits for a tick before executing
  • setTimeout(fn, n) - never sets the timeout to exactly n
  • Math.random() - computers cannot generate random numbers
  • Promise - is a lie when rejected
  • Array.reduce - accumulates, does not reduce (via @sbmadhav)
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@terkel
terkel / _decimal.scss
Last active November 23, 2023 18:36
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0