Skip to content

Instantly share code, notes, and snippets.

View keesiemeijer's full-sized avatar

Kees Meijer keesiemeijer

View GitHub Profile
@keesiemeijer
keesiemeijer / organic-maps-category-parser.py
Last active November 25, 2026 13:52
Organic Maps app search categories parser
from collections import defaultdict
from pathlib import Path
import re
# Parse categories.txt for Organic Maps in this language
LANGUAGE = "en" # Use a language code from categories.txt, e.g. "en".
# Download this file from https://github.com/organicmaps/organicmaps/blob/master/data/categories.txt
text = Path(__file__).with_name("categories.txt").read_text(encoding="utf-8")
@keesiemeijer
keesiemeijer / organic_maps_search_categories.md
Last active November 25, 2026 13:53
A list of categories used be the organic maps app search

Organic Maps App Search Categories

This list was generated from the Organic Maps App's categories.txt file with this category parser

Main Categories

Clickable categories shown on the app's main search screen.

ATM | Cash machine (@category_atm):
ATM

Bank (@category_bank):
Bank

Entertainment (@category_entertainment):Arcade | Bowling Alley | Cinema | Dance | Nightclub | Stage | Theatre

@keesiemeijer
keesiemeijer / led_feedback_hooks.c
Last active October 30, 2026 10:49
Led Feedback module hook file to shift layers down by 1
#include <zmk_led_feedback.h>
// The hooks below shift the LED count down by 1 for all layers except layer 0.
// Layer 0 gets its own unique color.
// Layer 0 shows 1 LED with its unique color.
// Layer 1 shows 1 LED with normal palette color.
// Layer 2 shows 2 LEDs with normal palette color.
// Etc...
@keesiemeijer
keesiemeijer / gist:b17a8663815b51a472561f0fe9b385dc
Last active October 21, 2026 20:07
Gir Rebase to merge commits
### Full Rebase Checklist (Vim)
To reword a specific commit message, or merge multiple commit messages in to one start an interactive rebase by running git rebase -i HEAD~n, where n is the number of commits back from HEAD you want to edit.
Then
- change `pick` to `reword` (or `r`) for the commit you want to modify
- change `pick` to `squash` (or `s`) for the commits you want to squash
`pick` simply means that the commit is included in the rebase. pick the oldest commit to merge newer commits into.
`
// ==UserScript==
// @name Imbd SkipAd
// @namespace Imbdskipad
// @version 0.1
// @description Remove IMBD header ad
// @author keesiemeijer
// @match https://www.imdb.com/*
// @grant none
// ==/UserScript==
@keesiemeijer
keesiemeijer / wp-topic-redirect.user.js
Last active January 20, 2020 07:06
A Greasemonkey user script that forces https, adds view=all to topic urls and redirects if needed
// ==UserScript==
// @name WordPress topic redirect
// @namespace WordPress_topic_redirect
// @description Forces https, adds view=all to topic urls and redirects if needed in the WordPress support forums.
// @version 1
// @grant none
// @run-at document-start
// @include *://*wordpress.org/support/topic/*
// @include *://wordpress.org/support/users/*
// @include *://wordpress.org/support/theme/*
@keesiemeijer
keesiemeijer / wp-word-frequency.txt
Last active March 20, 2018 16:29
WordPress functions and hooks word frequency
1118 wp
714 get
389 post
242 comment
217 link
190 user
158 update
156 the
141 meta
139 admin
@keesiemeijer
keesiemeijer / youtube-remove-ads.js
Last active October 19, 2022 20:57
Youtube skip ads and remove overlay ads after 3 seconds
// ==UserScript==
// @name Youtube SkipAd
// @namespace keesiemeijer
// @version 0.1
// @description Automatically skips ads after 5 seconds
// @author keesiemeijer
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
@keesiemeijer
keesiemeijer / widget.php
Last active September 13, 2017 16:08
Wiget with dropdown and back compatibility
<?php
add_action( 'widgets_init', 'register_my_scheduled_posts_widget' );
function register_my_scheduled_posts_widget() {
register_widget( 'My_Scheduled_Posts_Widget' );
}
class My_Scheduled_Posts_Widget extends WP_Widget {
@keesiemeijer
keesiemeijer / widget.php
Last active September 13, 2017 14:57
Widget with checkbox
<?php
add_action( 'widgets_init', 'register_my_scheduled_posts_widget' );
function register_my_scheduled_posts_widget() {
register_widget( 'My_Scheduled_Posts_Widget' );
}
class My_Scheduled_Posts_Widget extends WP_Widget {