Skip to content

Instantly share code, notes, and snippets.

@GerHobbelt
GerHobbelt / gist_markdown_examples.md
Last active December 29, 2022 08:21 — forked from jonschlinkert/markdown-cheatsheet.md
A better markdown cheatsheet.

Gist markdown examples

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.

Todo

  • Reformat this whole document and assimilate these:
@GerHobbelt
GerHobbelt / emoji-list.md
Last active June 6, 2024 11:46 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

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

Table of Contents

@GerHobbelt
GerHobbelt / remove_git_submodule.sh
Last active May 22, 2020 10:47 — forked from moyaldror/remove_git_submodule.sh
Complete remove of git submoule
#!/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
@GerHobbelt
GerHobbelt / what-forces-layout.md
Last active June 8, 2019 13:16 — 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()
@GerHobbelt
GerHobbelt / grammar.jison
Last active January 1, 2018 03:51 — forked from juliandavidmr/grammar.jison
grammar pseudo language
// 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'
@GerHobbelt
GerHobbelt / making-javascript-faster.md
Last active March 8, 2022 07:34
Making Javascript faster

Making Javascript faster

This is a list of guidelines to make your Javascript faster, often associated with jsPerf benchmarks.

Profile before optimizing

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.

@GerHobbelt
GerHobbelt / 0_reuse_code.js
Created January 7, 2014 06:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@GerHobbelt
GerHobbelt / README.md
Created September 16, 2012 14:22 — forked from gtb104/README.markdown
Polybrush Example

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!");
}
@GerHobbelt
GerHobbelt / README.md
Created September 11, 2012 01:23 — forked from phoebebright/data.csv
D3 using nest on csv data