View soup-drafts.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php function limit_soup( $args ) { | |
$args['post_status'] = array( 'draft', 'future' ); | |
return $args; | |
} | |
add_filter( 'soup_query', 'limit_soup' ); |
View enqueue.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php function load_parent_theme_css() { | |
$parentcss = get_template_directory() . '/style.css'; | |
wp_enqueue_style( | |
'parent-theme', | |
get_template_directory_uri() . '/style.css', | |
array(), | |
filemtime( $parentcss ) | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'load_parent_theme_css', 11 ); |
View do-snapshot.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rest-client' | |
require 'json' | |
require 'colorize' | |
$api_token = "xxxxxxxx" | |
$baseUrl = "https://api.digitalocean.com/v2/" | |
$headers = {:content_type => :json, "Authorization" => "Bearer #{$api_token}"} | |
$snapshots_to_keep = 10 |
View gist:ac7a3755051e1f5e9405
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[note]evanescent - adjective. having no permanence[/note] |
View new-index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel='stylesheet' id='child-theme-css' href='http://mysite.com/wp-content/themes/child/css/styles.css?ver=1447781986' type='text/css' media='all' /> |
View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel='stylesheet' id='child-theme-css' href='http://mysite.com/wp-content/themes/child/css/styles.css?ver=4.3.1' type='text/css' media='all' /> |
View new-enqueue.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$themecsspath = get_stylesheet_directory() . '/css/styles.css'; | |
wp_enqueue_style( | |
'child-theme', | |
get_stylesheet_directory_uri() . '/css/styles.css', | |
array(), | |
filemtime( $themecsspath ) | |
); |
View enqueue.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php wp_enqueue_style( 'child-theme', get_stylesheet_directory_uri() . '/css/styles.css', array(), '20150731' ); |
View gist:34330e083b610401f95d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service nginx -s reload |
View gist:a64a4790e00159febe73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# redirect http to https | |
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
listen [::]:80; ## listen for ipv6 | |
server_name dave.pe www.dave.pe; | |
return 301 https://dave.pe$request_uri; | |
} |
NewerOlder