Copied from https://gist.github.com/kevinSuttle/1997924
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
A collection of Markdown code and tricks that were tested to work in Gist.
This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.
A list of GitHub emoji markup, adapted from rxavier's Complete list of github markdown emoji markup, generated with a Grunt script for maintainability (see repository).
Additional original source material: http://unicode.org/emoji/charts/full-emoji-list.html
This table is available as a gist at https://gist.github.com/GerHobbelt/b9b87a2257ddd5251a45628d61385717 and as part of the build repo at https://github.com/GerHobbelt/emoji-list/blob/master/dist/emoji-list.md
#!/bin/bash | |
# | |
# Work repo: https://gist.github.com/GerHobbelt/5f084b559d3197c04e90dfd018a00ee6 | |
# | |
# Sources: | |
# https://stackoverflow.com/a/16162000/1635910 | |
# https://gist.github.com/myusuf3/7f645819ded92bda6677 | |
# https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule/1260982#1260982 | |
# | |
if [ $# -ne 1 ]; then |
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.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
elem.clientLeft
, elem.clientTop
, elem.clientWidth
, elem.clientHeight
elem.getClientRects()
, elem.getBoundingClientRect()
// https://gist.github.com/juliandavidmr/5c545f8cc1fe58d19986625a7a17f756 | |
/* description: Parses end executes mathematical expressions. */ | |
/* lexical grammar */ | |
%lex | |
%% | |
\s+ /* skip whitespace */ | |
[0-9]+("."[0-9]+)?\b return 'NUMBER' |
This is a list of guidelines to make your Javascript faster, often associated with jsPerf benchmarks.
If you have an existing codebase, don't get carried away with premature optimizations. Profile to find the slow bits and pick the low hanging fruit.
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Here's a d3 plugin that allows you to create a polygon selection. You instantiate it just like d3.svg.brush.
var brush = d3.svg.polybrush();
It has an extra public method that 'brush' does not, and that's 'isWithinExtent(x, y)'. You can use this method to test if a given point falls within the drawn extent.
if (brush.isWithinExtent(x, y)) {
console.log("I'm inside!");
}
Lots of examples of using d3.nest function
See it running at [http://bl.ocks.org/3695277] - original at [http://bl.ocks.org/3176159]
Documentation: [https://github.com/mbostock/d3/wiki/Arrays]