Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Donna McMaster donnamcmaster

🏠
Working from home
Block or report user

Report or block donnamcmaster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rhukster
rhukster / sphp.sh
Last active Feb 21, 2020
Easy Brew PHP version switching
View sphp.sh
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
osx_patch_version=${osx_patch_version:-0}
osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx_patch_version}))
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
@woogists
woogists / wc-query-woocommerce-active.php
Last active Oct 21, 2019
[Theming Snippets] Query whether WooCommerce is activated
View wc-query-woocommerce-active.php
/**
* Check if WooCommerce is activated
*/
if ( ! function_exists( 'is_woocommerce_activated' ) ) {
function is_woocommerce_activated() {
if ( class_exists( 'woocommerce' ) ) { return true; } else { return false; }
}
}
View force-css-js-to-go-live-immediately.php
<?php
// Version CSS file in a theme
wp_enqueue_style(
'theme-styles',
get_stylesheet_directory_uri() . '/style.css',
array(),
filemtime( get_stylesheet_directory() . '/style.css' )
);
View filter-gallery-shortcode
@salcode
salcode / .gitignore
Last active Jan 9, 2020
.gitignore file for a general web project - Bare Minimum Git
View .gitignore
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20181206
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@kohnmd
kohnmd / functions.php
Created Mar 5, 2014
Remove Post Locked Dialog in WP Admin
View functions.php
<?php
add_filter('show_post_locked_dialog', '__return_false');
@justintadlock
justintadlock / register-post-type.php
Last active Feb 19, 2020
Help file when registering post types.
View register-post-type.php
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@Rarst
Rarst / r-debug.php
Last active Jan 27, 2020
R Debug (set of dump helpers for debug)
View r-debug.php
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/
You can’t perform that action at this time.