Skip to content

Instantly share code, notes, and snippets.

View tordans's full-sized avatar

Tobias tordans

View GitHub Profile
@tordans
tordans / maplibre-number-formatting.js
Created February 3, 2024 11:23
Maplibre GL JS number formatting snipped
// Source https://osmus.slack.com/archives/C01G3D28DAB/p1706567778474359?thread_ts=1706534773.353969&cid=C01G3D28DAB
"text-field": [
"let",
"thousands",
["floor", ["/", ["get", "length_m"], 1000]],
[
"let",
"reminder",
[
@tordans
tordans / add-use-client-to-all-files.cjs
Created October 11, 2023 08:01
Quick helper script to add `use client` to all ts/tsx files in all folders except when it was added already. (Thanks to Github Copilot for creating this.)
// 0. Stash everything in git to have a clean slate
// 1. Update `folderPath`
// 2. Run with `node add-use-client-to-all-files.cjs` from the root of your project
const fs = require('fs')
const path = require('path')
const folderPath = './src/app' // Replace with the path to your folder
function updateFilesInFolder(folderPath) {
{
"#": "This JSON file is a small template to get you started developing a theme",
"#": "All lines starting with '#' are comments and can be removed in the theme if you don't need the explanation anymore",
"#": "Make sure to join our chat channel at https://app.element.io/#/room/#MapComplete:matrix.org for questions, sharing your theme, ...",
"#": "To actually load your theme: on linux: run a local webserver (e.g. `webfsd`) and go to https://mapcomplete.osm.be/theme?userlayout=http://127.0.0.1:8080/path-to-your-theme.json",
"#": "If you don't know how to run a webserver: go to https://www.base64encode.org/ , copy paste this entire document in the 'encode' field and encode it;",
"#": "Then, go to https://mapcomplete.osm.be/theme?userlayout=true#your-base64-encoded-file",
"id": "crossing",
"maintainer": "Crossing",
@tordans
tordans / index.html
Last active May 10, 2024 15:36
iD Editor Preset Preview Experiment
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>iD Test</title>
<link rel="stylesheet" href="dist/iD.css" />
<link
rel="icon"
type="image/png"
href="data:image/png;base64,iVBORw0KGgo="
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tordans
tordans / README.md
Last active December 21, 2021 13:40
@tordans
tordans / README.md
Last active September 30, 2019 23:33
Vereinfachte Verkehrsordnungswidrigkeitenanzeige bei Halt- und Parkverstößen

Notizen zu Tobias' Vortrag auf dem DataCycle Meetup am 15.01.2019.

Die Notizen sind nicht selbsterklärend. Aber wer da war, findet hier alle Links die ich gezeigt habe.

@tordans
tordans / index.html
Last active May 11, 2018 11:48
Rallye: Spendenaktionen Mini-Übersicht
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<title>Ralleys</title>