Skip to content

Instantly share code, notes, and snippets.

View waltspence's full-sized avatar

Walt Spence waltspence

View GitHub Profile
@waltspence
waltspence / .bashrc
Created June 27, 2016 17:54
bashrc for bash aliases, paths, etc.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@waltspence
waltspence / giphy.js
Created July 26, 2016 04:12 — forked from nealrs/giphy.js
use the giphy api to search for & add an animated gif to a webpage.
// on page load, search for & display a random gif matching your search term using the Giphy API.
// usage:
// include giphy.js in your <head>
// set q to your search term (e.g. "brunch")
// add <span id = "giphyme"></span> wherever you want to display the image. -- FYI, it will be centered.
// big ups to the Giphy crew (giphy.com)
// 2014 - Neal Shyam [@nealrs | nealshyam.com]
document.addEventListener('DOMContentLoaded', function () {
q = "finger guns"; // search query
@waltspence
waltspence / keybase.md
Created July 31, 2016 16:21
Keybase.io Verification

Keybase proof

I hereby claim:

  • I am waltspence on github.
  • I am waltspence (https://keybase.io/waltspence) on keybase.
  • I have a public key whose fingerprint is B59F 45AC 03AA D9AC 5763 37C8 6D3F 29CC 8D8F 0EE1

To claim this, I am signing this object:

@waltspence
waltspence / docker-wordpress.sh
Created August 12, 2016 07:35 — forked from tatemz/docker-wordpress.sh
A quick way to get a WordPress installation up and running with Docker
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
my-wpdb:
image: mariadb
ports:
@waltspence
waltspence / functions.php
Created October 27, 2016 22:08
Clean WP Header
/************
* Clean up *
*************/
// Remove WP Emojis
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
// Remove really simple discovery link
remove_action('wp_head', 'rsd_link');
@waltspence
waltspence / .bashrc
Created November 20, 2016 01:55
.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@waltspence
waltspence / sharify.php
Created November 20, 2016 02:02
Sharify Wordpress Function
<?php
/**
* Sharify (Social Buttons for Single Posts)
*
*@package AwesomeWP
*@since AwesomeWP 1.0.0
*/
function sharify_social_sharing_buttons($content) {
if ( is_single() ) {
@waltspence
waltspence / .htaccess
Created November 29, 2016 03:07 — forked from CBeloch/.htaccess
Giphy - Random GIF by Tag
# Will allow to use a .gif extension.
# Script can now be used as www.mydomain.com/pokemon.gif
RewriteEngine on
RewriteRule ^(.*).gif giphy.php?tag=$1 [L,QSA]
@waltspence
waltspence / update
Last active January 5, 2017 08:51
Update Ubuntu Server Script
#!/bin/bash
# ---------------------------------------------------------------------
# [@WaltSpence of @MakeGoCo]
# Updater
# A simple command to update debian based linux [sudo update]
# This is licensed under the Unlicense as seen at this link
# http://unlicense.org/UNLICENSE
# ---------------------------------------------------------------------
NAME=Updater
@waltspence
waltspence / bash
Last active March 28, 2017 06:23
Install Phantom and CasperJS easily with this bash script
#PhantomJS Exec Path
PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs