Skip to content

Instantly share code, notes, and snippets.

View keesiemeijer's full-sized avatar

Kees Meijer keesiemeijer

View GitHub Profile
@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 {
@keesiemeijer
keesiemeijer / functions.php
Created September 2, 2017 14:13
Override related posts with the WordPress Related Posts by Taxonomy plugin
add_action( 'widget_display_callback', 'page_widget_output', 10, 3 );
function page_widget_output( $instance, $widget, $args ) {
$plugin = function_exists( 'km_rpbt_plugin' ) ? km_rpbt_plugin() : false;
// Check if the plugin is activated and this is the related posts widget.
if ( ! $plugin || ( 'Related Posts By Taxonomy' !== $args['widget_name'] ) ) {
return $instance;
}
@keesiemeijer
keesiemeijer / gist:3cfbdd39f09ba30aff915287d67af6e7
Last active March 20, 2018 15:42
WordPress function word frequency
869 wp
559 get
225 post
124 link
113 is
106 comment
99 update
99 add
97 the
89 ajax