Skip to content

Instantly share code, notes, and snippets.

@adamturtle
adamturtle / gist:8797154
Last active August 29, 2015 13:56
Child theme comment
/*
Theme Name: Child Theme {Child Theme of Worpress Foundation}
Theme URI: http://320press.com/wpfoundation
Description: A bones/Zurb foundation based wordpress theme.
Version: 1.0
Template: wordpress-foundation
*/
@import url("../wordpress-foundation/style.css");
@adamturtle
adamturtle / module.js
Created August 6, 2014 20:55
Javascript module pattern
var Module = (function(){
// private var
var _privateVar = "private";
// private method
function _privateMethod() {
return "private bar";
}
// return public
/**
* Takes a jQuery collection and wraps each 'groupSize' items with 'wrapHtml'
* Example: $('#Example span').wrapInGroups('<div/>', 4);
* Will wrap every 4 span's inside #Example with a div
* See for yourself: http://jsfiddle.net/M9ZFh/
* Author: iMoses (imoses.g@gmail.com)
*/
(function($) {
$.fn.wrapInGroups = function(wrapHtml, groupSize) {
var selector = this.selector;
@adamturtle
adamturtle / style.css
Created September 19, 2014 17:33
Full width div break container
.break {
margin-left:-100%;
margin-right:-100%;
}
@adamturtle
adamturtle / Wordpress list last 5 posts by last modified date
Created June 26, 2012 20:46
Wordpress list last 5 posts by last modified date
$args=array(
'orderby'=> 'modified',
'order' => 'ASC',
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 5,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
@adamturtle
adamturtle / .slate
Created December 16, 2015 16:40
My .slate file
# Aliases
alias rightMonitorVertOffset 270
alias mailOffset 220
alias mailheight (1920/4)
alias textmateheight (1920-${mailheight})
alias topLeft corner top-left resize:screenSizeX/2;screenSizeY/2
alias topRight corner top-right resize:screenSizeX/2;screenSizeY/2
alias topFull corner top-left resize:screenSizeX;screenSizeY/2
alias bottomLeft corner bottom-left resize:screenSizeX/2;screenSizeY/2
alias bottomRight corner bottom-right resize:screenSizeX/2;screenSizeY/2
<?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>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>
@adamturtle
adamturtle / .inputrc
Created December 16, 2015 16:43
My .inputrc file
set completion-ignore-case On
@adamturtle
adamturtle / functions.php
Created June 7, 2013 14:12
Replaces the standard "Error with submission" message in Gravity Forms with a more useful summary of the errors.
<?php
function gf_custom_validation_message($message, $form){
return '<div class="validation_error">Please correct the following errors:<br/><div id="error_list"></div></div>';
}
add_filter("gform_validation_message", "gf_custom_validation_message", 10, 2);
@adamturtle
adamturtle / 0_reuse_code.js
Created September 27, 2013 15:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console