Skip to content

Instantly share code, notes, and snippets.

View webworthydesign's full-sized avatar

Webworthy Design webworthydesign

View GitHub Profile
@webworthydesign
webworthydesign / .htaccess
Created March 4, 2017 21:24 — forked from stevegrunwell/.htaccess
Load production WordPress uploads in a local version of the site by putting this in a new Htaccess file in /wp-content/uploads/
# Attempt to load files from production if they're not in our local version (replace {SITE URL} with your production server)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://{SITE URL}/wp-content/uploads/$1
</IfModule>
@webworthydesign
webworthydesign / typekit
Created March 4, 2017 16:59 — forked from colorful-tones/typekit
Enqueue Typekit fonts for WordPress
<?php
// TypeKit
wp_enqueue_script( 'elp-typekit', '//use.typekit.net/YOUR_KIT_NUMBER_ID.js');
function elp_typekit_inline() {
if ( wp_script_is( 'elp-typekit', 'done' ) ) { ?>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<?php }
}
add_action( 'wp_head', 'elp_typekit_inline' );
@webworthydesign
webworthydesign / 0_reuse_code.js
Created July 5, 2014 23:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console