Skip to content

Instantly share code, notes, and snippets.

View brianjking's full-sized avatar
💭
Doin' cool stuff at BrandMuscle AI

Brian J King brianjking

💭
Doin' cool stuff at BrandMuscle AI
View GitHub Profile
@DevinWalker
DevinWalker / woocommerce-optimize-scripts.php
Last active August 5, 2025 09:32
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@nciske
nciske / default-template.php
Created January 2, 2014 20:25
Default page template for The Events Calendar and Genesis 1.9 themes.
<?php
/**
* Default Events Template for Genesis
* This file is the basic wrapper template for all the views if 'Default Events Template'
* is selected in Events -> Settings -> Template -> Events Template.
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc. | Tweaked by Thought Refinery
*
# vim: ft=bash ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for BASH
#
# (Converted from ZSH theme by Kenny Root)
#
# # README
#
# In order for this theme to render correctly, you will need a
@neilgee
neilgee / socialmenu.html
Last active March 28, 2021 23:21
FontAwesome Social Media Menu
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
<style>
.social-menu {
display: flex;
list-style-type: none;
}
.social-menu i {
color: #fff;
@inetbiz
inetbiz / user_prefs
Last active November 26, 2016 12:55
User SpamAssassin Custom Settings
# SACONFIGSTART
# Make sure we get the required score header.
rewrite_header subject [SPAM] (_SCORE_)
# SACONFIGEND
# SA RULES GO HERE
add_header all Score _SCORE_
bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam -0.1
bayes_auto_learn_threshold_spam 6.0
@lonetwin
lonetwin / Git dot files management
Last active April 29, 2025 08:27
A simple way to manage dotfiles with git without silly symlinks and special tools. Just use negative matches in your .gitignore !
I like to manage dotfiles without having to mess with silly symlinks or having
to install/configure specific dotfile managament tools. So here's what I did:
$ cd ~
$ git init .
$ echo '*' > .gitignore # ignore all files by default
$ echo '!.bashrc' >> .gitignore # ...and then tell git what files not to *not* ignore
$ # ...add other files you may want to track to *not* ignore
$ git add .bashrc # now actually add the files to git
$ git add .gitignore # add the .gitignore to git
@matt-bailey
matt-bailey / async-and-conditional-css-loading.html
Last active August 19, 2025 16:14
A simple script (based on one by Google) for loading CSS files asynchronously and conditionally based on body tag classes
<html>
<head>
<!-- Inlined critical styles -->
<style>.blue{color:blue;}</style>
<!-- CSS loader -->
<script>
/* ==========================================================================
Load CSS asynchronously and conditionally after initial painting
@ellenbo
ellenbo / Genesis Sticky Nav: CSS
Last active October 12, 2017 17:42
Genesis Sticky Nav
/* Secondary Navigation
--------------------------------------------- */
.nav-secondary {
background-color: #333;
display: none;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
@jpgls
jpgls / devResources.md
Last active June 21, 2016 17:48
Living list of webdev resources