Skip to content

Instantly share code, notes, and snippets.

View vv314's full-sized avatar
🌿
Growing

Vincent vv314

🌿
Growing
View GitHub Profile
@robonxt
robonxt / Installing the Pebble app on iOS with Sideloadly.md
Last active November 6, 2024 21:32
Installing the Pebble app on iOS with Sideloadly - Rebble (Now)Official Installation Guide by robonxt

NOTICE:

Rebble have an official official guide based on this, so please follow their guide on their website at help.rebble.io/sideload-ios-app.

Please direct your questions and suggestions to the helpful people in the official Rebble Discord Server

This guide is in maintenance mode. I am only keeping this guide up as a archive and for those who stumble upon it through old links.

Thank you for all the support, and long live Pebble and Rebble!

@sindresorhus
sindresorhus / esm-package.md
Last active April 21, 2025 02:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@paulirish
paulirish / what-forces-layout.md
Last active April 19, 2025 04:59
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
@paulirish
paulirish / rAF.js
Last active April 17, 2025 15:06
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];