Skip to content

Instantly share code, notes, and snippets.

View georgiarnaudov's full-sized avatar

Georgi Arnaudov georgiarnaudov

  • Plovdiv, Bulgaria
View GitHub Profile
@georgiarnaudov
georgiarnaudov / index.html
Last active February 6, 2023 13:35
Product variations combination script. Works with a lot of options. In the current example there are only few available.
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Variant Selector</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
<script src="//unpkg.com/alpinejs" defer></script>
</head>
@georgiarnaudov
georgiarnaudov / degrees2meters.js
Created February 13, 2020 07:36 — forked from onderaltintas/degrees2meters.js
javascript coordinate conversions between 900913(3857) - 4326(lat lon)
var degrees2meters = function(lon,lat) {
var x = lon * 20037508.34 / 180;
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return [x, y]
}
//test
lon= -77.035974
lat = 38.898717