Skip to content

Instantly share code, notes, and snippets.

@m-hume
m-hume / WP_Persistent_Notices.php
Last active September 13, 2018 09:50 — forked from gschoppe/WP_Persistent_Notices.php
Implements a standardized messaging system that allows admin notices to be passed across page redirects.usage: add_filter( 'wp_persistent_notices', function( $notices ) { $notices[] = array( 'type' => 'error', 'message' => "Houston, we have a problem!" ); return $notices;} );
<?php if( !defined( 'ABSPATH' ) ) { die(); } // Include in all php files, to prevent direct execution
/**
* Class Name : WP Persistent Notices
* Description : Implements a Standardized messaging system that allows admin messages to be passed across page redirects.
* Class URI : http://gschoppe.com/wordpress/pass-wordpress-admin-notices-across-page-redirects/
* Version : 1.0.0
* Author : Greg Schoppe
* Author URI : http://gschoppe.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@m-hume
m-hume / rem.js
Created July 28, 2018 12:10
Remove hotjar branding from feedback
(function() {
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function (mutation) {
var added = mutation.addedNodes;
for ( var node, i = added.length; (node = added[--i]); ) {
if(!node.querySelectorAll){continue;}
var els = node.querySelectorAll('div[id$="_hotjar_branding"]');
if(els.length){
els[0].parentNode.removeChild(els[0]);
observer.disconnect();
@m-hume
m-hume / OutlookAdBlocker.user.js
Last active July 10, 2017 13:16 — forked from noelex/OutlookAdBlocker.user.js
Outlook.com Ad-Blocker
// ==UserScript==
// @name Office.com Ad-Blocker
// @namespace http://tampermonkey.net/
// @version 1.2
// @description try to take over the world!
// @author You
// @match https://outlook.live.com/owa/*
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// ==/UserScript==
@m-hume
m-hume / modify_nat.py
Last active June 12, 2022 19:10
This python script is used to read and modify the configuration of an EdgeMax ubnt router. Specifically it updates the source address of an inbound nat rule that allows remote administration from a dynamic IP address tied to a dynamic DNS account. Highly reusable is the function get_config_object(). Pass to this the textural content of config.bo…
#! /usr/bin/python
# This python script is used to read and modify the configuration of an EdgeMax
# ubnt router.
# Specifically it updates the source address of an inbound nat rule that allows
# remote administration from a dynamic IP address tied to a dynamic DNS account.
# Highly reusable is the function get_config_object(). Pass to this the textural
# content of config.boot and it will convert it into an object for querying.
# Feel free to use it and modify it!
# mh 2015 monkeyr.com
@m-hume
m-hume / 2_keyboard_shortcuts.md
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.

Create documentation for your projects. Like so:


Most popular keyboard shortcuts within GistBox

  • Up/Down - Previous/Next Gist
  • Ctrl+e - Edit a selected Gist
  • Ctrl+s - Save Gist