Skip to content

Instantly share code, notes, and snippets.

@hpohlmeyer
hpohlmeyer / essential-sketch-plugins.md
Last active August 23, 2017 07:47
Essential Sketch Plugins
@hpohlmeyer
hpohlmeyer / calculateIsoGrid.js
Last active May 24, 2017 12:07
2:1 isometric grid calculator
/**
* Calculate a 2:1 iso grid for specific sizes.
*
* @author Henning Pohlmeyer
*
* @param {number} smallestValue The smalles value to use in the grid.
* @return {object} The grid spacing value and rotate and
* shear values for each plane.
*/
function calculateIsoGrid(smallestValue) {
@hpohlmeyer
hpohlmeyer / hide-domain.md
Last active July 16, 2017 13:08
Prevent a domain from being indexed and listed on by search engines

Hide domain from search engines

Preventing the url from being indexed through the robots.txt is not enough. It may still be listed by search engines, unless you add the right header to you file, in the .htaccess.

Both files have to be put into the root directory of your domain.


@hpohlmeyer
hpohlmeyer / line-interpolation.js
Created December 11, 2017 12:55
Get a point on a line, defined by two other points
// Line Interpolation
function createLineInterpolationFunction(p1, p2) {
const slope = (p2.y - p1.y) / (p2.x - p1.x);
const yIntercept = p1.y - (slope * p1.x);
return (x) => slope * x + yIntercept;
}
// Example
const getY = createLineInterpolationFunction({ x: 200, y: 20}, { x: 1440, y: 60 });
const point = { x: 100, y: getY(100) };
@hpohlmeyer
hpohlmeyer / .gitconfig
Last active March 29, 2018 18:04
dotfiles
[user]
name = Henning Pohlmeyer
email = [email protected]
[alias]
# Basics
co = checkout
ci = commit
cm = commit -m
st = status
br = branch