This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
################################################################################ | |
# Generates a self-signed certificate based on a domain name parameter | |
# Domain name should be the hostname and TLD only. | |
# Key and certificate will be output into the current working directory. | |
# This is useful for generating certificates to be used with VVV. | |
# | |
# @link https://github.com/Varying-Vagrant-Vagrants/VVV/wiki/Site-specific-self-signed-SSL-certificates | |
################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'posts_search', 'jje_search_by_slug', 10, 2 ); | |
/** | |
* Add post slugs to admin search for a specific post type | |
* | |
* Rebuilds the search clauses to include post slugs. | |
* | |
* @param string $search | |
* @param WP_Query $query | |
* @return string | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'setup_theme', 'this_setup_theme' ); | |
/** | |
* Sets a different theme on the homepage from the rest of the site. | |
* | |
* Just checks the REQUEST_URI. Works, but hasn't been tested thoroughly. | |
* Currently it will only change if the query string is also empty, but if there | |
* needs to be query strings (e.g. utm_campaign, etc.) that can be dropped. | |
* | |
* Code from https://github.com/Rarst/toolbar-theme-switcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Selector_Cache() { | |
var elementCache = {}; | |
var get_from_cache = function( selector, $ctxt, reset ) { | |
if ( 'boolean' === typeof $ctxt ) { reset = $ctxt; } | |
var cacheKey = $ctxt ? $ctxt.selector + ' ' + selector : selector; | |
if ( undefined === elementCache[ cacheKey ] || reset ) { | |
elementCache[ cacheKey ] = $ctxt ? $ctxt.find( selector ) : jQuery( selector ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************************** | |
// plugin for equalizing heights, responsively | |
//******************************************************** | |
(function ($) { | |
$.fn.eqHeights = function() { | |
var el = $(this); | |
if (el.length > 0 && !el.data('eqHeights')) { | |
$(window).on('resize.eqHeights', function() { | |
el.eqHeights(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Just an abbreviation for creating filenames | |
SHORT_NAME=je | |
# hostname as configred in ~/.ssh/config | |
SERVER_NAME=je | |
# Database name in production | |
DB_NAME=XXXX | |
# Database user in production | |
DB_USER=XXXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'WP_DEBUG', true ); | |
if ( WP_DEBUG ) { | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'SAVEQUERIES', true ); | |
define( 'SCRIPT_DEBUG', true ); | |
@ini_set( 'display_errors', 0 ); | |
if ( function_exists( 'xdebug_disable' ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --pretty=format:"- %s%n%b" --since="$(git show -s --format=%ad `git rev-list --tags --max-count=1`)" |