Skip to content

Instantly share code, notes, and snippets.

View jbrinley's full-sized avatar

Jonathan Brinley jbrinley

View GitHub Profile
#!/usr/bin/env bash
docker_project_alias()
{
if [[ $1 == "core" ]]; then
echo "global";
elif [[ $1 == "dw" ]]; then
echo "dealerweb";
elif [[ $1 == "s1" ]] || [[ $1 == "sq" ]]; then
echo "square";
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA8pZP+un2jGZnEpY3cbbAcAq3X8ZwIkvMlf7gzweb1EVp4e/wjRD5V4bct3U/xucAO9j5OjgmKHegNyIigUUbloxnmE2ArLH95d5fkXybN9WebnLxpDZtavqHftO17oosKaA+3TMKpAMt1rfgBRFMmY0pHyyYWSXzIgD1LWHEfeli+ALRwgLD5+kCOqqB73zwE5tQC4OWqIcAIcTSzPS9JhSdLjLwaUCdybTfPE6LvouXMEHoX4baK4E4WP1ZHT5kLUocJkA2g7iwUyk46OVck5O6VwflJRe0hmMNnzkQ3QCtKLSjXyz3JcqVyepkj4eZpt+1AYlBi/TQVVV/UcznSw== jbrinley@flightless.us
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: docker (MySQL 5.5.52)
# Database: wordpress
# Generation Time: 2016-09-19 02:06:44 +0000
@jbrinley
jbrinley / install.md
Created August 20, 2016 01:05
Install Docker for Mac

Mac

Prerequisites

  • 2010 or newer Mac
  • OS X 10.10.3 or later
  • Uninstall VirtualBox if you have version 4.3.30 or earlier

Install Docker for Mac

@jbrinley
jbrinley / Dockerfile
Last active August 3, 2016 20:24
PHP7 FPM dockerfile
# Use Alpine Linux
FROM alpine:latest
# Environments
ENV TIMEZONE Etc/UTC
ENV PHP_MEMORY_LIMIT 512M
ENV MAX_UPLOAD 50M
ENV PHP_MAX_FILE_UPLOAD 200
ENV PHP_MAX_POST 100M
@jbrinley
jbrinley / gist:10990289
Created April 17, 2014 15:04
Add this to functions.php in your theme to disable the automatic creation of future events.
add_action('init', 'disable_future_event_scheduling', 11, 0);
function disable_future_event_scheduling() {
TribeEventsRecurrenceMeta::get_scheduler()->remove_hooks();
}
<?php
add_filter( 'tribe_get_list_widget_events', 'cc_tribe_get_list_widget_events' );
function cc_tribe_get_list_widget_events( $posts ) {
$output_posts = [];
$used_posts = [];
$query = new WP_Query([
'eventDisplay' => 'list',
'posts_per_page' => 3,
@jbrinley
jbrinley / gist:6848286
Last active February 14, 2016 20:59
Filter Modern Tribe's Events Calendar to show ticket prices from the WooCommerce Tickets add-on. Add this to your theme's functions.php, or put it in an mu-plugin.
function my_wootickets_tribe_get_cost( $cost, $postId, $withCurrencySymbol ) {
if ( empty($cost) && class_exists('TribeWooTickets') ) {
// see if the event has tickets associated with it
$wootickets = TribeWooTickets::get_instance();
$ticket_ids = $wootickets->get_Tickets_ids( $postId );
if ( empty($ticket_ids) ) {
return '';
}
// see if any tickets remain, and what price range they have
<?php
/*
Plugin Name: The Events Calendar - Downgrade Recurrence
Description: Downgrading from 3.4 to an earlier version of The Events Calendar? Activate this plugin to restore recurrence settings.
Version: 1.0
Author: Modern Tribe, Inc.
Author URI: http://tri.be?ref=tec-plugin
Text Domain: tribe-events-calendar
License: GPLv2 or later
<?php
/**
* Switch the interal blog id.
*
* This changes the blog id used to create keys in blog specific groups.
*
* @since 3.5.0
*
* @param int $blog_id Blog ID
*/