Skip to content

Instantly share code, notes, and snippets.

View davidwatkins73's full-sized avatar
🌍
Deleting

David Watkins davidwatkins73

🌍
Deleting
View GitHub Profile
@davidwatkins73
davidwatkins73 / narrow_widen.js
Last active April 2, 2020 13:56
Useful bookmarklets
// ->|--|<- (Narrow)
javascript:w = document._w || 1100; w = w - 100; document.body.style.width = w + "px"; document._w = w;
// <-|--|-> (Widen)
javascript:w = document._w || 900; w = w + 100; document.body.style.width = w + "px"; document._w = w;
@davidwatkins73
davidwatkins73 / caps_to_ctrl.ahk
Created January 10, 2020 14:00
Remaps capslock to control (left ctrl) in AutoHotKey. Needed as thin client at work does not allow other mechanisms of key remapping
*$CapsLock::
Send {LControl down}
Sleep 300
Send {LControl up}
@davidwatkins73
davidwatkins73 / Liquibase-XML-inserts.xml.groovy
Last active September 29, 2022 14:50
Jetbrains Intellij / Datagrip: Data Extractor - allows export of row data into Liquibase compatible insert statements
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
@pdamoc
pdamoc / Mario.elm
Created May 8, 2016 20:00
Mario 0.17
import Html exposing (..)
import Keyboard
import Window exposing (Size)
import AnimationFrame
import Task
import Html.App as App
import Collage exposing (..)
import Element exposing (..)
@emeeks
emeeks / README.md
Last active June 11, 2022 18:42
circularbrush.filter

The earlier example of this brushable radial chart led to some feedback to make the filtering better. I introduced a #circularBrush.filter(array,accessor) that takes an array of data and and accessor for that data and returns to you the data that falls into the area of the brush. The functionality of this chart is no different than the other, but if you take a look at the code, it's much more efficient.

@paulirish
paulirish / what-forces-layout.md
Last active April 28, 2024 14:20
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
@ohanhi
ohanhi / frp.md
Last active December 23, 2022 13:06
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing