Skip to content

Instantly share code, notes, and snippets.

@nontech
nontech / Final Report GSoC 2022.md
Last active December 4, 2023 00:31
This is my final report for my GSoC 2022 OpenStreetMap(OSM) project
@aleixmorgadas
aleixmorgadas / keychron K3.md
Last active January 6, 2023 12:36
Keychron K3 Linux
@andrebrait
andrebrait / keychron_linux.md
Last active April 25, 2024 13:24
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@brgr
brgr / suedtirolerisch.tsv
Last active May 3, 2023 13:01
Südtirolerisch - Deutsch
a auch, ein
a bissl ein bisschen
a leig auf haartracht betreffend
a nettlä ettliche, viele
a posto in Ordnung
a Readl (Vinschg.) eine kurze Zeit (Weile)
a Schliafr ein Anlehnungsbedürftiger
a Soch ritzn etwas erledigen
aagnen nadeln von fichten tannen usw.
Aanaxa kleiner Traktor mit einer Achse
@aoles
aoles / mannheim.sh
Created October 25, 2018 10:32
Sample script for creating geographic extracts of OSM data
#!/bin/bash
URL=https://download.geofabrik.de/europe/germany/baden-wuerttemberg/karlsruhe-regbez-latest.osm.pbf
RELATION_ID=62691
RELATION_NAME=mannheim
###
echo "Downloading $URL"
SOURCE=$(basename "$URL")
curl $URL -o $SOURCE

Geojson.net

Geojson.net will be a replacement for geojson.io, the simple editor for map data. In most ways, it has the same intent, goals, limitations, and ideas of geojson.io - they're both projects of mine.

I created geojson.io as a side project in 2013, and it thrived for a few years, as it simply solved the problem of previewing, modifying, and creating map data. I think it benefited from simplicity and unity of thought: it wasn't a product, it didn't have overarching design goals or any sort of leadership. There was the core functionality, and a bunch of functionality that pretty neatly layered on top of that without making the whole thing too intimidating. I'm pretty happy with how it went.

Over the last two or so years, though, geojson.io hasn't changed much, and the web has. Which means that, in a few ways, it's just straight-up broken: GitHub integration is broken, it was never updated to accommodate for the deprecation of anonymous gists, and

@frafra
frafra / osh2sqlite.py
Last active October 8, 2018 07:49
OSM node history to SQLite
#!/usr/bin/env python3
#
# OSM node history to SQLite
import osmium
import sqlite3
import sys
SCHEMA_OBJECT = """
@veltman
veltman / README.md
Last active November 25, 2019 20:16
Smoother polygon transitions

Smooth transitioning US tour in the same vein as this example. Steps:

  1. Compares both shapes and adds evenly-spaced points to whichever polygon has fewer so that both have the same number of points
  2. Picks the winding of the first polygon that minimizes the sum of the squared distances between point pairs

Some possible improvements:

  • Adding additional points to both shapes first such that every segment longer than a certain distance is bisected
  • Tweaking the placement of added points with simulated annealing
  • Using a cost function that factors in self-intersections at the halfway mark in addition to distance traveled
@tyrasd
tyrasd / readme.md
Last active August 16, 2017 10:03
osm-analytics server setup walkthrough

Cruncher

  • install node/npm, curl
  • compile and install tippecanoe (version 1.8.1 works, not sure about newer releases)
  • download run.sh from cruncher repo and chmod +x it
  • replace osmqatiles-planet url with the extract you want
  • adjust paths in run.sh (and mkdir the respective working directories)
  • comment out hotprojects.sh (would fail because it requires valid AWS credentials to upload stuff into a hardcoded bucket).
  • comment out the forever restart … lines (requires a tile-serving script to be already running)
  • execute run.sh -> … -> two .mbtiles files in results directory
/*
EXAMPLE MESSAGE
/poll "question?" "option 1" "option 2"
*/
/** Global Helpers
*
* console - A normal console instance
* _ - An underscore instance