Skip to content

Instantly share code, notes, and snippets.

View blbradley's full-sized avatar

Brandon Bradley blbradley

  • Nashville, TN
View GitHub Profile
@thegdshop
thegdshop / gist:2141771
Created March 20, 2012 22:08
WooCommerce - Change add to cart button text
<?php
add_filter('single_add_to_cart_text', 'woo_custom_cart_button_text');
function woo_custom_cart_button_text() {
return __('My Button Text', 'woocommerce');
}
@jorendorff
jorendorff / gist:3665043
Created September 7, 2012 10:45
Nashville hack day is November 10

Hi, everyone.

On November 10 we're throwing another hack day and we would like you to be there.

Info and sign-up: http://code.nashvl.org/

This is a free, one-day event by Nashville developers for Nashville developers. Coffee and lunch provided. Beers after.

@jorendorff
jorendorff / json.hs
Last active December 11, 2015 14:09
data JSON = JSONNull
| JSONBool Bool
| JSONNumber Double
| JSONString String
| JSONArray [JSON]
| JSONObject [(String, JSON)]
deriving (Eq, Ord, Show)
@jorendorff
jorendorff / censored.py
Last active December 13, 2015 22:49
Full script, minus comments, of the mystery program in this blog post: http://pynash.org/2013/02/19/English-playground.html
""" censored.py - Randomly ######## ############## ################## #####
#### ########## ## ### Brown Corpus.
To run this program without affecting your Python install:
mkdir mystery-program
cd mystery-program
wget https://gist.github.com/jorendorff/4987554/raw//censored.py
virtualenv venv
. venv/bin/activate
@vinbarnes
vinbarnes / indentation_hell.rb
Last active December 14, 2015 19:19
I'd prefer the second way unless there's some weird Ruby reason why I shouldn't...
module My
module Job
class ReconcileAccounts
# ...
end
end
end
@jfryman
jfryman / gist:5808537
Created June 18, 2013 19:36
NagiosDB - Generate Nagios configs from Puppet Exported Resources + PuppetDB
#!/usr/bin/env ruby
#
# Nagios/PuppetDB config generator
#
# Based on concept from puppetdb-external-naginator
# https://github.com/favoretti/puppetdb-external-naginator
#
# Generates nagios configs from puppet(db) exported resources.
#
require 'rubygems'
1. TWSS
2. It's a revelation
3. F18, bro.
4. Leprechaun
5. Ronco
6. Seven Chinese Brothers
7. Movin' on up
8. Toledo armchair
9. Bo and Luke Duke
10. Vigorous rhinocerous
@jameskoster
jameskoster / index.php
Last active March 12, 2017 06:30
WooCommerce - Sample products loop
<ul class="products">
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => 12
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) : $loop->the_post();
wc_get_template_part( 'content', 'product' );
@jameskoster
jameskoster / functions.php
Last active June 18, 2017 19:20
Change number of products per row in a WooThemes WooCommerce theme
// Override theme default specification for product # per row
function loop_columns() {
return 5; // 5 products per row
}
add_filter('loop_shop_columns', 'loop_columns', 999);
@jfryman
jfryman / personal_boxen_manifest.pp
Last active November 30, 2019 05:05
Personal Boxen Manifest
class people::jfryman {
# Applications
include chrome::stable
include onepassword
include dropbox
include alfred
include macvim
include zsh
include homebrew
include fitbit