Skip to content

Instantly share code, notes, and snippets.

View keesiemeijer's full-sized avatar

Kees Meijer keesiemeijer

View GitHub Profile
// ==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
about
absint
absolute
accents
access
accordion
account
action
actions
activate
absint
access_denied_splash
activate_plugin
activate_plugins
add_action
add_blog_option
add_clean_index
add_comment_meta
add_comments_page
add_cssclass