Skip to content

Instantly share code, notes, and snippets.

View maxehnert's full-sized avatar

Max Ehnert maxehnert

View GitHub Profile
@adamreisnz
adamreisnz / package.json
Last active January 19, 2024 13:01
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Reis",
"url": "http://adam.reis.nz"
},
"license": "UNLICENSED",
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@paulirish
paulirish / what-forces-layout.md
Last active June 19, 2024 15:52
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
@saintvictoria
saintvictoria / lightWAVE.bootstrap.sh
Created April 21, 2015 13:59
MacVim bootstrap to intall LightWAVE locally
#! /bin/bash
set -e
sudo yum install -y httpd.x86_64
sudo service httpd start
sudo yum install -y libcurl-devel.x86_64
curl -OL http://prdownloads.sourceforge.net/libcgi/libcgi-1.0.tar.gz
tar xf libcgi*
cd libcgi-1.0
./configure
make CFLAGS='-fPIC'
@termi
termi / crossBrowser_initKeyboardEvent.js
Last active June 13, 2023 02:01
Cross-browser initKeyboardEvent
void function() {//closure
var global = this
, _initKeyboardEvent_type = (function( e ) {
try {
e.initKeyboardEvent(
"keyup" // in DOMString typeArg
, false // in boolean canBubbleArg
, false // in boolean cancelableArg
, global // in views::AbstractView viewArg