Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Looking for work in the Seattle, WA or remote areas. https://brianjking.io

Brian J King brianjking

💭
Looking for work in the Seattle, WA or remote areas. https://brianjking.io
View GitHub Profile
@jesseeproductions
jesseeproductions / ecp-remove-gen-bc
Created Oct 27, 2014
Remove Genesis Breadcrumbs from the Event Calendar View Pages
View ecp-remove-gen-bc
/*
* 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' );
@jesseeproductions
jesseeproductions / ecp-genesis-sharing
Last active Aug 29, 2015
The Events Calendar Include Genesis Simple Sharing Above Event Calendar
View ecp-genesis-sharing
/**
* 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 );
@deripasko
deripasko / csvtotable.php
Last active Aug 29, 2015
csvtotable.php
View csvtotable.php
<?php
$a = explode("\n", $input);
foreach ($a as $key => $line)
{
$a[$key] = explode(",", $line);
};
foreach ($a as $element)
{ $output .="
<tr>
View _breakpoints.scss
// @media (min-width:320px) { /* smartphones, iPhone, portrait 480x320 phones */ }
// @media (min-width:481px) { /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */ }
// @media (min-width:641px) { portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones }
// @media (min-width:961px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
// @media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
// @media (min-width:1281px) { /* hi-res laptops and desktops */ }
@mixin bp-phone {
@media all and (min-width: 140px) and (max-width: 640px) {
@joseluisq
joseluisq / Material-Theme.itermcolors
Last active Aug 29, 2015
Material Theme Color Schema for iTerm2
View Material-Theme.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
View README
This configuration is a working copy which I have tested on Apache 2.2.x and 2.4.x
I highly recommend you use this version of mod_fastcgi as it works with Apache 2.4.x, fastcgi.com version does not!
https://github.com/ByteInternet/libapache-mod-fastcgi
The fastcgi.com version is 2.4.6, the version I am recommending registers as 2.4.7
To patch mod_fastcgi for use with Apache 2.4.x look at the debian/patches folder. It's not specific to Debian OS so don't let that fool you. I personally use Archlinux.
Of course to compile mod_fastcgi:
@daimagine
daimagine / nginx.conf
Created Jun 28, 2015
Nginx Configuration
View nginx.conf
user www;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /usr/local/etc/nginx/nginx.pid;
events {
worker_connections 1024;
}
View docker-notes.sh
# --------------------------------------------------------------------------------------------------------
# BASIC ACTIONS
# -------------------------------------------------------------------------------------------------------
# start up a new machine
docker-machine create --driver virtualbox dev
# list VMs
docker-machine ps
View meta-tags-ie.html
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="cleartype" content="on">
@jesseeproductions
jesseeproductions / tec-yoast-title-rewrite.php
Last active Aug 29, 2015
The Events Calendar - Yoast SEO - Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,)
View tec-yoast-title-rewrite.php
/*
* The Events Calendar - Yoast SEO - Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,)
* @TEC - 3.11
* @Yoast - 2.3.4
*/
add_action( 'pre_get_posts', 'tribe_remove_wpseo_title_rewrite', 20 );
function tribe_remove_wpseo_title_rewrite() {
if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {
$wpseo_front = WPSEO_Frontend::get_instance();
You can’t perform that action at this time.