Skip to content

Instantly share code, notes, and snippets.

View pakastin's full-sized avatar
❄️

Juha Lindstedt pakastin

❄️
View GitHub Profile
const CACHE = "cache_name_here";
self.addEventListener("fetch", (event) => {
const handled = handler(event).then((response) => {
if (!(response instanceof Response)) {
return new Response("Something went wrong", {
status: 500,
});
}
return response;
#!/bin/bash
consolidated_file="./consolidated.json"
for i in $(find . -name '*.shp'); do
if [ ! -f "$consolidated_file" ]; then
# first file - create the consolidated output file
ogr2ogr -f GeoJSON $consolidated_file -t_srs EPSG:4326 $i
else
# update the output file with new file content
ogr2ogr -f GeoJSON -update -append $consolidated_file -t_srs EPSG:4326 $i
fi