Skip to content

Instantly share code, notes, and snippets.

View heychriszappa's full-sized avatar

Chris Zappa heychriszappa

View GitHub Profile
@bekarice
bekarice / edit-woocommerce-checkout-template.php
Last active October 28, 2024 06:16
Add content and notices to the WooCommerce checkout - sample code
/**
* Each of these samples can be used - note that you should pick one rather than add them all.
*
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/
**/
/**
* Add a content block after all notices, such as the login and coupon notices.
*
@blogjunkie
blogjunkie / functions.php
Last active March 16, 2019 01:06
Custom page titles for co-authors with WordPress SEO
<?php
/**
* Custom page titles for Guest Authors with WordPress SEO
* Returns "[author name]&#39;s articles on [site name]"
*
*/
add_filter('wpseo_title', 'my_co_author_wseo_title');
function my_co_author_wseo_title( $title ) {
@jaredatch
jaredatch / gist:1562aa6de1bc33db0bb3
Created February 13, 2015 17:20
Change author box title text in Genesis
<?php
/**
* Change "About" text in author box titles for single posts
*
* @since 1.0.0
* @param string $title
* @param string $context
* @return string
*/
function ja_author_box_title( $title, $context ) {
@gooddadmike
gooddadmike / Slackbot Responses - rock paper scissors lizard spock.md
Last active May 10, 2016 18:02
Slackbot Responses - rock, paper, scissors, spock, lizard.

This was inspired by Big Bang Theory and Sam Kass

Supports both my standard rock paper scissors and the "lizard spock expansion (this gist)

Follow directions for standard rock paper scissors first to set up emoji.

update: I decided ✂️ is nothing like ✌️ so should not be part of this

Emoji Alias for Expansion update: There is now a :spock-hand: emoji (doesn't show in github yet)

@craigeley
craigeley / doing_timer.sh
Created December 2, 2015 02:15
A script that shows elapsed time of the current `doing` task in TextBar. Change the path to your doing in line 5.
if [[ `/usr/local/bin/doing last` == *"@done"* ]]; then
echo "💬";
else
name=`/usr/local/bin/doing last | sed 's/@.*//g'`;
start=`grep -o -m 1 "\d*-\d*-\d*\s\d*:\d*\s" /path/to/what_was_i_doing.md`;
date1=`date -j -f '%Y-%m-%d %H:%M ' "$start" +"%s"`;
now=`date -j +"%s"`;
diff=$(($now-$date1));
echo "$name 🕗$(printf "%02d" $(($diff / 3600))):$(printf "%02d" $((($diff / 60) % 60)))"
fi