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
@jesseeproductions
jesseeproductions / ecp-remove-gen-bc
Created October 27, 2014 18:42
Remove Genesis Breadcrumbs from the Event Calendar View Pages
/*
* Remove Genesis Breadcrumbs from the Event Calendar View Pages
* The Events Calendar @3.8
* Genesis @2.1.2
*/
add_action( 'genesis_before', 'tribe_remove_genesis_breadcrumbs' );
function tribe_remove_genesis_breadcrumbs() {
if( tribe_is_upcoming() || tribe_is_past() || tribe_is_map() || tribe_is_photo() || tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_photo() ) {
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
@fduran
fduran / django_install_apache.md
Last active February 12, 2017 15:34
Django Install - Apache

Django Install - Apache

Once per server:

apt-get update && apt-get upgrade
apt-get install libapache2-mod-wsgi
apt-get install python-setuptools python-dev build-essential
easy_install -U pip

@fduran
fduran / django-install-nginx-uwsgi.md
Last active February 19, 2016 00:05
Django Install - Nginx uwsgi

Django Install - Nginx uwsgi

Once per server:

apt-get update && apt-get upgrade
apt-get install python-setuptools python-dev build-essential
easy_install -U pip
pip install virtualenv

@neilgee
neilgee / meanmenu.php
Last active December 1, 2015 16:45
MeanMenu Genesis
<?php
//do not copy the opening php tag
//Load MeanMenu Mobile Menu
function meanmenu_load_scripts() {
wp_enqueue_script( 'meanmenu', get_stylesheet_directory_uri() . '/js/jquery.meanmenu.min.js', array( 'jquery' ), '2.0.8', true );
wp_enqueue_style( 'meanmenucss',get_stylesheet_directory_uri() .'/css/meanmenu.min.css', '', '2.0.8', 'all' );
}
add_action( 'wp_enqueue_scripts', 'meanmenu_load_scripts' );
@jesseeproductions
jesseeproductions / ecp-genesis-sharing
Last active August 29, 2015 14:11
The Events Calendar Include Genesis Simple Sharing Above Event Calendar
/**
* The Events Calendar - Include Genesis Simple Sharing Above Single Events Content
*
*/
add_filter( 'tribe_events_single_event_before_the_content', 'tribe_genesis_event_share' );
function tribe_genesis_event_share( $post_info ) {
if ( is_singular('tribe_events') && function_exists( 'genesis_share_get_icon_output' ) ) {
global $Genesis_Simple_Share;
$share = genesis_share_get_icon_output( 'entry-meta', $Genesis_Simple_Share->icons );
@renventura
renventura / genesis-force-layouts.php
Last active November 27, 2017 02:55
Genesis Layouts
<?php //* Mind this opening PHP tag
/*
* Full list source: https://gist.github.com/wpsmith/3666330
*/
/*
* Force Layout - No User Override
*/
@stephenscaff
stephenscaff / wordpress-sql-url-search-replace
Created January 1, 2015 18:11
Search and replace SQL query for Wordpress migration. In phpMyAdmin, select database, go to SQL tab... click, click boom.
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
@JeffPaine
JeffPaine / vim-notes.md
Last active January 3, 2019 23:20
General vim notes.

Vim Notes

  • set list Shows invisible characters.
  • set listchars What invisibile characters should be set to, see :h listchars for complete list.

Key Remapping

  • map creates a key map that works in normal, visual, select and operator pending modes
  • map! creates a key map that works in insert and command-line mode.
@domenic
domenic / 0-github-actions.md
Last active June 6, 2025 08:01
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@stephenscaff
stephenscaff / script-styles.php
Created January 17, 2015 15:59
Scripts and Styles Enqueue for my little wp starter theme, The Jump Off. I actually require_once this file into functions.php from a lib folder to keep things organized.
/*-------------------------------------------*/
/* Register and enqueue scripts and styles
/*-------------------------------------------*/
function jumpoff_scripts_and_styles() {
if ( !is_admin() ) {
//Register Styles
wp_register_style( 'jumpoff_styles',get_template_directory_uri() . '/assets/css/app.min.css', false );
wp_register_style( 'jumpoff_fonts',get_template_directory_uri() . '/assets/css/fonts.min.css', false );