Skip to content

Instantly share code, notes, and snippets.

View andyspicer's full-sized avatar

Andy Spicer andyspicer

View GitHub Profile
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
@andyspicer
andyspicer / t
Last active December 14, 2015 20:59 — forked from billerickson/template-test.php
WP - Genesis Custom Loop
<?php
/**
* RGP-Snippet for Genesis Custom Loop
*/
function rgp_custom_loop() {
global $post;
// arguments, adjust as needed
$args = array(
'post_type' => 'post',
@andyspicer
andyspicer / gist:5162072
Created March 14, 2013 15:05
WP - Genesis Custom Loop Empty
/** Replace the standard loop with our custom loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'rgp_do_custom_loop' );
function rgp_do_custom_loop() {
}
@andyspicer
andyspicer / gist:5169214
Created March 15, 2013 11:26
WP - Register / Enqueue Scripts
add_action( 'wp_enqueue_scripts', 'rgp_load_javascript_files' );
// Register our javascript files. We'll enqueue some now and some on specific pages.
function rgp_load_javascript_files() {
wp_register_script( 'rgp-functions', get_template_directory_uri() . '/js/rgp-functions.js', array(''), '', true );
/*wp_enqueue_script( 'info-carousel-instance' );*/
/*if ( is_front_page() ) {
@andyspicer
andyspicer / gist:5169696
Created March 15, 2013 12:51
WP - Genesis Load Custom Stylesheet
// Load custom style sheet
add_action( 'wp_enqueue_scripts', 'rgp_load_custom_style_sheet' );
function rgp_load_custom_style_sheet() {
wp_enqueue_style( 'translate', CHILD_URL . '/css/translate.css', array(), PARENT_THEME_VERSION );
}
@andyspicer
andyspicer / gist:5169704
Created March 15, 2013 12:52
WP - Replace Default Stylesheet
// Replace default style sheet
add_filter( 'stylesheet_uri', 'rgp_replace_default_style_sheet', 10, 2 );
function rgp_replace_default_style_sheet() {
return CHILD_URL . '/css/custom.css';
}
@andyspicer
andyspicer / gist:5348298
Created April 9, 2013 18:48
WP - CPT List Shortcode
function rgp_listing_list_shortcode() {
$loop = new WP_Query(
array(
'post_type' => 'listing',
'orderby' => '_rgp_listing_status'
)
);
$output_active = '<ul class="rgp_active_list">';
$output_sold = '<ul class="rgp_sold_list">';
# ~/.osx — http://mths.be/osx
# root check
if [[ $EUID -ne 0 ]]; then
echo "################################";
echo "## YOU ARE NOT RUNNING AS ROOT #";
echo "################################";
echo "#";
echo "# USAGE: sudo $0";
exit;
@andyspicer
andyspicer / WinSrvPDCTimeSetup.reg
Created May 5, 2013 11:22
Windows Server Authoritative Time Server registry entry.
; This file adds the necessary registry entries to enable a
; Windows Server to be an authoratative Time Server NTP
; this will allow it to act as the time server for the
; domain. It gets it's time data from the ntp pool servers
;
; 1. Double click this .reg file on the Server
;
; 2. Run net stop w32time && net start w32time
;
;original source url - http://www.konkotech.com/blog/?p=160

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.