Skip to content

Instantly share code, notes, and snippets.

@rfair404
rfair404 / gist:7521f46696cccc0b156ead659a876b2d
Created December 4, 2018 16:57
WP mu-plugin for testing HTTP error codes
View gist:7521f46696cccc0b156ead659a876b2d
<?php
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'];
View URL Blacklist for Chrome (User Settings)
*/html/crosh.html
chrome://extensions
chrome://settings
chrome://flags
https://accounts.google.com/AddSession
https://accounts.google.com/AccountChooser
chrome://history-frame
chrome://chrome/history-frame
View zshrc alias for google apps
# Google Apps Suite Custom Aliases (for bash / zsh, etc)
alias 'gdoc=open https://docs.google.com/document/u/0/'
alias 'gsht=open https://docs.google.com/spreadsheets/u/0/'
alias 'gdrv=open https://drive.google.com/drive/u/0/my-drive'
alias 'gcal=open https://calendar.google.com/calendar/render?pli=1#main_7'
alias 'gml=open https://mail.google.com/mail/u/0/#inbox'
alias 'yt=open https://youtube.com/'
# bonus alias for new gist y'all
alias 'gist=open https://gist.github.com/'
View text only
@kristenbrooks77about 7 hours ago by Kristen
Kristen Twitterabout 7 hours ago by Kristen
When making classes if code.org would add a QR code to the student cards it would be super helpful for K-3rd students.about 7 hours ago by Kristen
https://code.org/files/CSEDrobotics.pdfabout 8 hours ago by Tanya
Try the Tickle App to code robotics and more!about 9 hours ago by Tanya
http://thefoos.com/about 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 - ozobot.com ozoblockly.comabout 9 hours ago by Tanya
View gist:f24a678914aa5f41f296
/**
* 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
rfair404 / gist:9613888
Last active August 29, 2015 13:57
My Leprechaun Trap Arduino Sketch
View gist:9613888
/*
* 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
rfair404 / gist:6031668
Created July 18, 2013 18:23
sample the for the startcode kids
View gist:6031668
<!doctype html>
<html lang="en">
<head>
<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="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
@rfair404
rfair404 / gist:4150286
Created November 26, 2012 20:04
Rip off the Agentpress Listings Widget to enable Keyword Search
View gist:4150286
/**
* 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() {