Skip to content

Instantly share code, notes, and snippets.

Sutherland Boswell suth

Block or report user

Report or block suth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
suth / sortable.js
Created Jan 26, 2017
Vue.js 2.0 Sortable Directive
View sortable.js
import Vue from 'vue'
import Sortable from 'sortablejs'
Vue.directive('sortable', {
inserted: function (el, binding, vnode) {
var sortable = new Sortable(el, binding.value || {});
if (binding.arg) {
if (!vnode.context.sortable) {
vnode.context.sortable = {}
View video-importer-temporary-drafts.php
Plugin Name: Video Importer Temporary Drafts
Plugin URI:
Description: Temporarily saves imported posts as a draft so any publishing logic doesn't run until custom fields are saved
Version: 1.0
Author: Refactored Co.
Author URI:
View video-thumbnails-markup-and-custom.php
Plugin Name: Find Video Thumbnails in Post and Custom Field
Plugin URI:
Description: Mod for Video Thumbnails to also scan the post content when a custom field is entered in the settings.
Author: Refactored Co.
Author URI:
Version: 0.1
License: GPL2
View extend-http-request-timeout.php
Plugin Name: Extend HTTP Request Timeout
Plugin URI:
Description: Extends the default timeout length for the WordPress HTTP API
Author: Sutherland Boswell
Author URI:
Version: 1.0
License: GPL2
View wp-conditional-css.php
function my_css_function() {
if ( is_single() && get_post_meta( get_the_ID(), 'field_key', true ) != '' ) {
wp_enqueue_style( 'style-name', 'folder/stylesheet.css' );
add_action( 'wp_enqueue_scripts', 'my_css_function' );
suth / gist:2895907
Created Jun 8, 2012
Quick WordPress Instance
View gist:2895907
#! /bin/bash
echo "WordPress Instance Setup"
echo "========================"
echo "Enter a domain for your site"
read domain
suth / gist:2640615
Created May 9, 2012
Facebook Thumbnail Class
View gist:2640615
class Facebook_Thumbnails extends Video_Thumbnails_Providers {
// Regex strings
public $regexes = array(
'#"[0-9]+)"#' // Facebook Embed
// Thumbnail URL
public function get_thumbnail_url( $id ) {
return '' . $id . '/picture';
You can’t perform that action at this time.