Skip to content

Instantly share code, notes, and snippets.

View colorful-tones's full-sized avatar
💓
Don’t believe the hype!

Damon Cook colorful-tones

💓
Don’t believe the hype!
View GitHub Profile
@colorful-tones
colorful-tones / gutenberg-sample-content.html
Last active February 21, 2019 00:36 — forked from mailenkno/gutenberg-sample-content.html
WordPress Gutenberg Sample Content
<!-- wp:heading {"level":1} -->
<h1>This is a heading (H1)</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>This is a heading (H2)</h2>
<!-- /wp:heading -->
<!-- wp:heading {"level":3} -->
<h3>This is a heading (H3)</h3>
@colorful-tones
colorful-tones / ssl.sh
Created January 31, 2018 21:00 — forked from polevaultweb/ssl.sh
Easily create local SSL certificates for development sites that work with you own Certificate Authority https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/
#!/bin/sh
if [ "$#" -ne 1 ]
then
echo "Usage: Must supply a domain"
exit 1
fi
DOMAIN=$1
@colorful-tones
colorful-tones / wds-javascript-style.js
Created February 10, 2016 18:07 — forked from gregrickaby/wdsjQuery.js
WDS Javascript Style
/**
* Foo Script.
*/
window.Foo_Object = {};
( function( window, $, that ) {
// Private variable.
var fooVariable = 'foo';
// Constructor.
@colorful-tones
colorful-tones / wds-back-to-top.js
Created December 17, 2015 21:43 — forked from gregrickaby/wds-back-to-top.js
WDS Javascript Back To Top
/**
* Back To Top.
*/
window.Back_To_Top = {};
( function( window, $, that ) {
// Private variables.
var minWidth = 768;
var minHeight = 200;
// Usage:
// get_id_by_slug( 'any-page-slug' );
function get_id_by_slug( $page_slug ) {
$page = get_page_by_path( $page_slug );
if ( $page ) {
return $page->ID;
} else {
return null;
@colorful-tones
colorful-tones / .htaccess
Last active October 16, 2015 14:59 — forked from gregrickaby/example-nginx.conf
redirect /uploads/ folder for dev
# Apache .htaccess
RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1
# Nginx
location ~ ^/wp-content/uploads/(.*) {
rewrite ^/wp-content/uploads/(.*)$ http://livewebsite.com/wp-content/uploads/$1 redirect;
}