Skip to content

Instantly share code, notes, and snippets.

View kristofer84's full-sized avatar
🙂

Kristofer Nilsson kristofer84

🙂
  • Stockholm, Sweden
View GitHub Profile
@hermanbanken
hermanbanken / Dockerfile
Last active June 9, 2024 22:18
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@fabulator
fabulator / index.js
Created May 10, 2018 14:04
Google export json to gpx
const fs = require('fs');
const createGpx = require('gps-to-gpx').default;
const program = require('commander');
program
.version('0.1.0')
.command('parse <inputFile>')
.option('--from <from>', 'From which date parse data YYYY-MM-DDTHH:ii.')
.option('--to <to>', 'To which date parse data YYYY-MM-DDTHH:ii.')
.option('--accuracy <accuracy>', 'Minimal accuracy.')
@srvrguy
srvrguy / make-vc-keys.ps1
Created March 10, 2016 18:04
A PowerShell script to make a 2048-bit RSA keypair. Saves the files in XML format in the user's document directory.
# Create a 2048-bit RSA Keypair in XML format
#
# @author Michael Johnson <michael.johnson@snap.md>
# @copyright 2016 SnapMD, Inc.
# @license https://opensource.org/licenses/BSD-2-Clause Simplified BSD License
<#
Copyright (c) 2016, SnapMD, Inc.
All rights reserved.
@paulirish
paulirish / what-forces-layout.md
Last active June 26, 2024 20:47
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.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent