Skip to content

Instantly share code, notes, and snippets.

View smchenrybc's full-sized avatar

Sean McHenry smchenrybc

View GitHub Profile
@smchenrybc
smchenrybc / Slack_solarized_themes
Created September 5, 2018 17:04 — forked from mgreensmith/Slack_solarized_themes
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F
@smchenrybc
smchenrybc / bookmark.min.js
Created October 16, 2018 21:10 — forked from zaydek-old/bookmark.min.js
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@smchenrybc
smchenrybc / custom-queries.php
Created September 26, 2019 16:53 — forked from carlodaniele/custom-queries.php
An example plugin showing how to add custom query vars, rewrite tags and rewrite rules to WordPress
<?php
/**
* @package Custom_queries
* @version 1.0
*/
/*
Plugin Name: Custom queries
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele
@smchenrybc
smchenrybc / flow-error-icu4c-not-loaded.md
Created December 20, 2019 20:54 — forked from berkedel/flow-error-icu4c-not-loaded.md
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
@smchenrybc
smchenrybc / gist:e690f6a3f32abf90319bf0b118c046f4
Created June 9, 2022 19:24 — forked from jcobb/gist:2993853
Combine multiple WordPress queries
<?php
// An example of creating two separate WP queries, combining the results,
// sorting by date and formatting the results for us in a loop like a regular query.
// order the posts by date in descending order (should go in functions.php to keep things tidy)
function order_by_date( $a, $b )
{
return strcmp( $b->post_date, $a->post_date );
}
@smchenrybc
smchenrybc / gist:6f835d159fe2d5885516eb56b68f8bc1
Created April 24, 2023 18:54 — forked from ckpicker/gist:ffe7c737b73e5d581bad
The Events Calendar // Dequeue Styles
function dequeue_tribe_styles() {
// Dequeue events calendar stylesheets
wp_dequeue_style( 'tribe-events-full-calendar-style' );
wp_dequeue_style( 'tribe-events-calendar-style' );
wp_dequeue_style( 'tribe-events-calendar-full-mobile-style' );
wp_dequeue_style( 'tribe-events-calendar-mobile-style' );
wp_dequeue_style( 'tribe-events-full-pro-calendar-style' );
wp_dequeue_style( 'tribe-events-calendar-pro-style' );
wp_dequeue_style( 'tribe-events-calendar-full-pro-mobile-style' );
@smchenrybc
smchenrybc / local-error-handler.php
Last active September 22, 2023 18:58 — forked from bradyvercher/local-error-handler.php
Suppress errors generated by specified WordPress plugins to make developing with debug mode on less painful.
<?php
/**
* Suppress errors generated by specified WordPress plugins.
*
* Include in the auto_prepend_file php.ini directive to ignore globally.
*
* @see http://plugins.trac.wordpress.org/browser/ostrichcize/tags/0.1/ostrichcize.php#L146
*
* @param string $errno The error number.
* @param string $errstr The error message.