Skip to content

Instantly share code, notes, and snippets.

Verifying that +mr_cbmd is my blockchain ID. https://onename.com/mr_cbmd
@cbmd
cbmd / what-forces-layout.md
Last active September 21, 2015 18:53 — forked from paulirish/what-forces-layout.md
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.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@cbmd
cbmd / gist:9887568
Created March 31, 2014 08:12
keybase.md
### Keybase proof
I hereby claim:
* I am cbmd on github.
* I am cbmd (https://keybase.io/cbmd) on keybase.
* I have a public key whose fingerprint is E463 3C74 0400 4D31 497B F696 E50C 585C F070 7908
To claim this, I am signing this object:
@cbmd
cbmd / default.conf
Created December 9, 2012 21:13
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";