Skip to content

Instantly share code, notes, and snippets.

View farhanjiwani's full-sized avatar
💭
I may be slow to respond.

Farhan Jiwani farhanjiwani

💭
I may be slow to respond.
View GitHub Profile
@olets
olets / nvm-ls-g
Last active May 19, 2021 15:44
List global packages for all nvm Nodes
#!/usr/bin/env sh
# nvm-ls-g
# Henry Bley-Vroman
# MIT License, 2018
# Lists the globally-installed npm packages
# for every nvm-installed version of Node
# Usage:
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 25, 2024 20:36
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@paulirish
paulirish / what-forces-layout.md
Last active July 25, 2024 07:49
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
@willurd
willurd / web-servers.md
Last active July 25, 2024 21:14
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000