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
@brianjking
brianjking / .bashrc
Created December 10, 2015 16:23 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@brianjking
brianjking / nginx.conf
Created December 2, 2015 14:37 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@brianjking
brianjking / functions.php
Created December 1, 2015 16:49 — forked from wpspeak/functions.php
Force auto-updates for WordPress plugins
<?php
//* Force auto-updates for WordPress plugins
add_filter( 'auto_update_plugin', '__return_true' );
/* Secondary Navigation
--------------------------------------------- */
.nav-secondary {
background-color: #333;
display: none;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
<?php //* Mind this opening PHP tag
/*
* Full list source: https://gist.github.com/wpsmith/3666330
*/
/*
* Force Layout - No User Override
*/
@brianjking
brianjking / meanmenu.php
Created December 1, 2015 16:45 — forked from neilgee/meanmenu.php
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' );
@brianjking
brianjking / tec-single-bar.php
Created December 1, 2015 16:45 — forked from jesseeproductions/tec-single-bar.php
The Events Calendar - Load Tribe Bar Script on Single Events
/*
* The Events Calendar - Load Tribe Bar Script on Single Events
* @version 3.11.1
*/
add_action( 'template_redirect', 'tribe_admin_bar_script' );
function tribe_admin_bar_script() {
if ( is_singular( 'tribe_events' ) ) {
add_filter( 'tribe-events-bar-should-show', '__return_true' );
//wp_enqueue_script( 'tribe-events-bar' );
@brianjking
brianjking / tec-mon-redirect
Created December 1, 2015 16:45 — forked from jesseeproductions/tec-mon-redirect
The Events Calendar - Redirect Mobile Users to List View
/*
* The Events Calendar - Redirect Mobile Users to List View
* @version 3.9
*
* @link http://theeventscalendar.com/support/forums/topic/forcing-list-view-on-mobile-only/
*/
add_action( 'template_redirect', 'tec_mobile_template_redirect' );
function tec_mobile_template_redirect() {
if( tribe_is_month() && wp_is_mobile() ) {
wp_redirect( tribe_get_listview_link() );
@brianjking
brianjking / tec-pro-countdown
Created December 1, 2015 16:44 — forked from jesseeproductions/tec-pro-countdown
The Events Calendar - CSS to Center Countdown Widget
/* Countdown Title */
.widget.tribe-events-countdown-widget {
width: 300px;
margin: 0 auto;
}
/* Countdown */
.widget.tribe-events-countdown-widget .tribe-countdown-timer {
margin: 0 auto;
width: 200px;
#!/bin/bash
#Below steps will only install the plugin.It wont be enabled
yum -y install epel-release
yum -y install http://rpm.piserve.com/nDeploy-release-centos-1.0-1.noarch.rpm
yum --enablerepo=ndeploy install nginx-nDeploy nDeploy
#Below Step is optional.It is required if you need Phusion Passenger(Ruby/Python/NodeJS)
/usr/nginx/scripts/nginx-passenger-setup.sh
#Below step will enable the plugin.