Skip to content

Instantly share code, notes, and snippets.

View dschep's full-sized avatar

Daniel Schep dschep

View GitHub Profile
@dschep
dschep / wkt_all_states.txt
Created December 16, 2025 21:28 — forked from JoshuaCarroll/wkt_all_states.txt
WKT polygons of all US states' borders
Alaska
POLYGON((-141.0205 70.0187,-141.7291 70.1292,-144.8163 70.4515,-148.4583 70.7471,-151.1609 70.7923,-152.6221 71.1470,-153.9954 71.1185,-154.8853 71.4307,-156.7529 71.5232,-157.9449 71.2796,-159.6313 71.2249,-161.8671 70.6363,-163.5809 70.0843,-165.2399 69.3028,-166.8768 69.1782,-168.0414 68.3344,-165.9155 67.6844,-164.6082 67.2933,-164.0149 66.7789,-165.7507 66.5810,-167.5745 66.2867,-168.9862 66.0269,-168.9478 65.4970,-167.4756 65.0420,-167.0142 64.3922,-165.7343 64.0554,-163.2294 64.0193,-162.1143 63.9615,-163.6029 63.6877,-165.3717 63.4530,-166.3715 62.4133,-166.9867 61.6534,-166.4429 60.8556,-167.8381 60.5357,-167.7118 59.5482,-165.8002 59.4115,-164.5972 59.3696,-162.8558 59.1168,-162.5427 58.1185,-160.6421 58.1359,-159.5050 58.0285,-158.8953 57.6336,-159.9060 56.9090,-160.6531 56.3926,-161.8835 56.2342,-162.9822 55.7240,-164.3994 55.2478,-165.3168 54.7753,-167.1075 54.1463,-168.5852 53.5632,-169.9146 53.1402,-169.5959 52.5964,-168.2227 52.9089,-162.7734 54.2139,-159.1452 54.6786,-155.4634 55.656
@dschep
dschep / gejsonio-add-raster-overlay.js
Created February 1, 2025 15:07
Add Raster Overlay to geojson.io
javascript:(()=>{
if (window.location.host!=='geojson.io') {
alert('This bookmarlet only works on geojson.io');
return;
}
const m = window.api.map;
const xyz = prompt("Enter your XYZ Raster Tile URL to overlay");
if (m.getLayer('overlay')) m.removeLayer('overlay');
if (m.getSource('overlay')) m.removeSource('overlay');
m.addSource('overlay', {type: 'raster', tileSize: 256, tiles: [xyz]});
@dschep
dschep / example.js
Created November 18, 2024 14:07 — forked from jcubic/example.js
Simple S-Expression (lisp) paser in JavaScript
console.log(parse(`(define (square x)
"Function calculate square of a number"
(* x x))`)[0].toString());
// ==> (define (square x) "funkcja square wywołanie (square 10) zwraca 100" (* x x))
---
options:
hash: m
attributionControl:
customAttribution: '<a href=".">Overpass Ultra</a>'
bounds: [-77.49784362036736,37.50408772391166,-77.40437276428577,37.57742791260068]
maxBounds: [-77.49784362036736,37.50408772391166,-77.40437276428577,37.57742791260068]
controls:
- type: GeolocateControl
options:
@dschep
dschep / staticfavicon.js
Last active December 6, 2023 14:41
Disable favicon updates
javascript:(() => {
const observer = MutationObserver(({addedNodes, removedNodes}) => {
console.log("favicon change!", addedNodes, removedNodes);
});
observer.observe(document.head, {childList: true});
})();
@dschep
dschep / _Customizing MapSwap List.md
Last active December 1, 2023 19:19
MapSwap Presets

Sample MapSwap configs

This gist contains a few example MapSwap configs.

@dschep
dschep / RegionalBikeways.geojson
Last active November 2, 2023 14:40
Richmond, VA Regional Bikeways
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dschep
dschep / go-to-gh-repo-from-page.js
Created September 13, 2023 12:39
Go to Github Repo from Page
javascript:javascript=window.location=window.location.host.replace(/([^.]+)\.github\.io/, `https://github.com/$1/${window.location.pathname.split("/")[1]}`)
.PHONY: help
help: # Print help
@awk 'BEGIN {FS = ":.*?# *"} /^[.a-zA-Z_-]+:.*?# */ {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@dschep
dschep / wordle-cheat
Last active February 11, 2022 15:00
Solve Wordle
javascript:JSON.parse(window.localStorage.getItem('nyt-wordle-state')).solution.split('').concat(['Enter']).map(key=>window.dispatchEvent(new KeyboardEvent('keydown',{key})))&&undefined;