Skip to content

Instantly share code, notes, and snippets.

rfair404 / gist:7521f46696cccc0b156ead659a876b2d
Created December 4, 2018 16:57
WP mu-plugin for testing HTTP error codes
if( isset( $_GET['code'] ) && isset( $_GET['error'] ) ) {
add_action('send_headers', 'error_test_check_headers');
function error_test_check_headers() {
$codes = error_test_get_codes();
$code = $_GET['code'];
# Google Apps Suite Custom Aliases (for bash / zsh, etc)
alias 'gdoc=open'
alias 'gsht=open'
alias 'gdrv=open'
alias 'gcal=open'
alias 'gml=open'
alias 'yt=open'
# bonus alias for new gist y'all
alias 'gist=open'
@kristenbrooks77about 7 hours ago by Kristen
Kristen Twitterabout 7 hours ago by Kristen
When making classes if would add a QR code to the student cards it would be super helpful for K-3rd students.about 7 hours ago by Kristen 8 hours ago by Tanya
Try the Tickle App to code robotics and more!about 9 hours ago by Tanya 9 hours ago by Tanya
$50 off Dash and Dot Redemption code for robots: CODE1389Fabout 9 hours ago by Tanya
Dash and Dot - makewonder.comabout 9 hours ago by Tanya
Sphero/Ollie/BB8 - sphero.comabout 9 hours ago by Tanya
Ozobot - ozoblockly.comabout 9 hours ago by Tanya
* create_image_credits sets up the credits for an image
* @param $image string the attachment id
* @return string the image credit file url
function create_image_credits($image){
$image_post = get_post($image);
$upload_dir = wp_upload_dir();
$image_guid = explode('/', $image_post->guid);
$filename = end($image_guid);
rfair404 / gist:9613888
Last active August 29, 2015 13:57
My Leprechaun Trap Arduino Sketch
* My Leprechaun capture scetch
* Mainly adopted from some existing public tutorials plus a little tinkering
* this code is public domain, enjoy!
* by Russell Fair
#include <Servo.h>
Servo servo1;
rfair404 / gist:6031668
Created July 18, 2013 18:23
sample the for the startcode kids
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Learning HTML5 at START:CODE Summer Camp</title>
<meta name="description" content="A Basic Webpage Template for Learning HTML5">
<meta name="author" content="Put Your Name Here">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="js/jquery-2.0.3.min.js"></script>
<script src="//"></script>
rfair404 / gist:4150286
Created November 26, 2012 20:04
Rip off the Agentpress Listings Widget to enable Keyword Search
* This widget presents a search widget which uses listings' taxonomy for search fields.
* @package AgentPressTwo
* @since 2.0
* @author Russell Fair
class AgentPressTwo_Listings_Search_Widget extends WP_Widget {
function AgentPressTwo_Listings_Search_Widget() {