Skip to content

Instantly share code, notes, and snippets.

View MikeGillihan's full-sized avatar
🏠
Working from home

Mike Gillihan MikeGillihan

🏠
Working from home
View GitHub Profile
@MikeGillihan
MikeGillihan / cl-date-shortcode.php
Created November 12, 2025 22:44
cl_date shortcode
<?php
namespace CLToolkit;
use CLToolkit\Traits\Singleton;
use DateTime;
use DateTimeZone;
use Exception;
class Shortcodes {
@MikeGillihan
MikeGillihan / hide-tec-fields.php
Created November 12, 2025 22:42
Hide TEC fields
<?php
/**
* The Events Calendar customizations
*
* @package CauseLabsToolkit
*/
namespace CLToolkit\Integrations;
use CLToolkit\Traits\Singleton;
@MikeGillihan
MikeGillihan / facetwp.php
Created November 12, 2025 22:27
FacetWP Checkbox Markup
/**
* Replace FacetWP default HTML output for "Checkboxes" with Bootstrap custom checkbox markup
*
* @param $output
* @param $params
*
* @return string
*/
add_filter( 'facetwp_facet_html', function( $output, $params ) {
if ( 'checkboxes' !== $params['facet']['type'] ) {
# -----------------------------------------------------------------
# .gitignore for WordPress
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/MikeGillihan/9bd7610afd4b594d31ee12b81ac88687/raw/.gitignore
# to download this file
#
# By default all files are ignored. You must whitelist any
# mu-plugins, plugins, or themes you want to include in the repo.
#
...
/**
* Get all GiveWP donation forms
*
* @return array List of GiveWP forms
*/
public function list_forms() {
$list = array( '' => __( 'Select a Form', GoodModules::$text_domain ) );
$forms = get_posts( array(
@MikeGillihan
MikeGillihan / cloudSettings
Last active November 8, 2019 23:07
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-11-08T23:07:53.840Z","extensionVersion":"v3.4.3"}
# Stop syncing a node_modules directory (via symlink)
noicloud() {
mv node_modules node_modules.nosync
ln -s node_modules.nosync/ node_modules
}
alias nocloud=noicloud
@MikeGillihan
MikeGillihan / HeartThis.php
Created December 26, 2017 22:15
Filter the output of the HeartThis for the front page
add_filter( 'heart_this_hearts', 'custom_heart_this_hearts' );
/**
* Filter the output of the HeartThis for the front page
*
* @param $output
* @param bool $post_id
*
* @return string
*/
function custom_heart_this_hearts( $output, $post_id = false ) {
@MikeGillihan
MikeGillihan / CopyAsanaTasks.php
Created December 15, 2016 04:06 — forked from AWeg/CopyAsanaTasks.php
main changes: - Asana has own SSL cert -> had to add to lines of code - copies subtasks and up to 11 subtasks of subtasks - copies tags -> only tagnames not followers/descriptions
function asanaRequest($methodPath, $httpMethod = 'GET', $body = null)
{
$apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api
$url = "https://app.asana.com/api/1.0/$methodPath";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;
curl_setopt($ch, CURLOPT_USERPWD, $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
{
"bold_folder_labels": true,
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 2,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"fade_fold_buttons": false,
"font_face": "Source Code Pro",
"font_options":