See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
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.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| # The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
| # | |
| # Current known FCC address ranges: | |
| # https://news.ycombinator.com/item?id=7716915 | |
| # | |
| # Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
| # | |
| # In your nginx.conf: | |
| location / { |
| Hi there, | |
| We've been noticing errors coming from chartbeat.js: "Object #<SVGAnimatedString> has no method 'replace'" - I took a moment to diagnose the issue and found the error to arise when you click on an SVG node with an HREF attribute. It looks like there's a click handler for anchor tags that isn't aborting when the SVG node is clicked: | |
| r.W = function(a) { | |
| var b, c; | |
| if (a = a || window.event) { | |
| c = a.target || a.srcElement; | |
| if (c.tagName !== "A") | |
| if (c.parentNode) |
| // Peter Hrynkow | |
| // Grid mixin | |
| [class*=span-] { | |
| float: left; | |
| position: relative; | |
| } | |
| @mixin grid ($name, $columns, $padding-x, $padding-y) { | |
| $column-width: 100% / $columns; | |
| @for $i from 1 through $columns { | |
| .span-#{$name}-#{$i} { |
| haiku = -> | |
| adjs = [ | |
| "autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark", | |
| "summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter", | |
| "patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue", | |
| "billowing", "broken", "cold", "damp", "falling", "frosty", "green", | |
| "long", "late", "lingering", "bold", "little", "morning", "muddy", "old", | |
| "red", "rough", "still", "small", "sparkling", "throbbing", "shy", | |
| "wandering", "withered", "wild", "black", "young", "holy", "solitary", | |
| "fragrant", "aged", "snowy", "proud", "floral", "restless", "divine", |
A quick jQuery plugin for asynchronously embedding a gist in an HTML document.
There are a couple of ways to use it. The simpler way is replacing all Gist links in document by their embedded version:
<script>$($.gist);</script>
All links that point to a gist, or gist file will be replaced by the corresponding embedded gist, or gist file.
Gist link replacement can also be called on a container element: