Skip to content

Instantly share code, notes, and snippets.

Dave Clements theukedge

Block or report user

Report or block theukedge

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
View soup-drafts.php
<?php function limit_soup( $args ) {
$args['post_status'] = array( 'draft', 'future' );
return $args;
add_filter( 'soup_query', 'limit_soup' );
View enqueue.php
<?php function load_parent_theme_css() {
$parentcss = get_template_directory() . '/style.css';
get_template_directory_uri() . '/style.css',
filemtime( $parentcss )
add_action( 'wp_enqueue_scripts', 'load_parent_theme_css', 11 );
theukedge / do-snapshot.rb
Last active May 7, 2016
Creates snapshots of your DigitalOcean droplets automatically and deletes the oldest snapshots to ensure you only maintain the most recent "x" snapshots (where x is configurable). Forked from
View do-snapshot.rb
#!/usr/bin/env ruby
require 'rest-client'
require 'json'
require 'colorize'
$api_token = "xxxxxxxx"
$baseUrl = ""
$headers = {:content_type => :json, "Authorization" => "Bearer #{$api_token}"}
$snapshots_to_keep = 10
View gist:ac7a3755051e1f5e9405
[note]evanescent - adjective. having no permanence[/note]
View new-index.html
<link rel='stylesheet' id='child-theme-css' href='' type='text/css' media='all' />
View index.html
<link rel='stylesheet' id='child-theme-css' href='' type='text/css' media='all' />
View new-enqueue.php
$themecsspath = get_stylesheet_directory() . '/css/styles.css';
get_stylesheet_directory_uri() . '/css/styles.css',
filemtime( $themecsspath )
View enqueue.php
<?php wp_enqueue_style( 'child-theme', get_stylesheet_directory_uri() . '/css/styles.css', array(), '20150731' );
View gist:a64a4790e00159febe73
# redirect http to https
server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80; ## listen for ipv6
return 301$request_uri;
You can’t perform that action at this time.