Skip to content

Instantly share code, notes, and snippets.

View stipsan's full-sized avatar

Cody Olsen stipsan

View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active May 16, 2025 17:21
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
@colinramsay
colinramsay / gist:42d3dbd0316212d65161
Created May 12, 2015 20:24
react-router 0.13.2 TransitionGroup
let AnimationWrapper = React.createClass({
render() {
console.log(this.props.childClassName + ' render');
return this.props.children;
},
componentWillAppear (callback) {
console.log(this.props.childClassName + ' willappear');
callback();
@derekli66
derekli66 / Reinstall_Cocoapods
Last active May 22, 2024 17:59
Reinstall Cocoapods
When pod install or pod update gets hanged at "Analyzing dependencies", please consider to reinstall cocoapods.
#Uninstallation. Reference: http://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine
$gem list --local | grep cocoapods
#The list will show like this
cocoapods (0.27.1, 0.20.2)
cocoapods-core (0.27.1, 0.20.2)
cocoapods-downloader (0.2.0, 0.1.2)
@ericelliott
ericelliott / essential-javascript-links.md
Last active March 22, 2025 17:28
Essential JavaScript Links
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 16, 2025 13:41
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: