Skip to content

Instantly share code, notes, and snippets.

View apulley's full-sized avatar

Andrew apulley

  • Chicago
View GitHub Profile
@apulley
apulley / discoverHearthstone.js
Created September 26, 2016 17:11 — forked from vladinator1000/discoverHearthstone.js
The "Discover" mechanic in Hearthstone
// It was 3 AM and me and my girlfriend were wondering how would this card look in code, so here's what we came up with:
// http://hearthstoneplayers.com/img/cards/netherspite-historian.png
// The cards in your hand
const hand = [
{
name: 'Sylvanas',
keyword: 'deathrattle',
},
{
@apulley
apulley / what-forces-layout.md
Created April 11, 2016 07:40 — 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()
@apulley
apulley / markdown.css
Last active August 29, 2015 14:18 — forked from imjasonh/markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}

Creating a Happy Git Environment on OS X

Step 1: Install Git

Configure things:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global alias.co checkout

git config --global apply.whitespace nowarn