Skip to content

Instantly share code, notes, and snippets.

View kdzwinel's full-sized avatar

Konrad Dzwinel kdzwinel

View GitHub Profile
@kdzwinel
kdzwinel / reloadCSS.js
Last active February 13, 2020 11:18
Reload CSS files without reloading the page
function reloadCSS() {
const links = document.getElementsByTagName('link');
Array.from(links)
.filter(link => link.rel.toLowerCase() === 'stylesheet' && link.href)
.forEach(link => {
const url = new URL(link.href, location.href);
url.searchParams.set('forceReload', Date.now());
link.href = url.href;
});
@kdzwinel
kdzwinel / LICENSE.txt
Last active February 11, 2020 17:40
Custom Elements finder < 140 bytes (119 bytes)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@kdzwinel
kdzwinel / trilateration.js
Created January 3, 2014 09:35
Simple trilateration algorithm implementation in JavaScript.
function getTrilateration(position1, position2, position3) {
var xa = position1.x;
var ya = position1.y;
var xb = position2.x;
var yb = position2.y;
var xc = position3.x;
var yc = position3.y;
var ra = position1.distance;
var rb = position2.distance;
var rc = position3.distance;
@kdzwinel
kdzwinel / index.md
Last active February 11, 2020 17:41
What can be built with JS/HTML/CSS?

#What can be built with JS/HTML/CSS?

Any application that can be written in JavaScript will eventually be written in JavaScript.

Jeff Atwood, July 17, 2007

Desktop app