Skip to content

Instantly share code, notes, and snippets.

@patrickhills
patrickhills / 0_reuse_code.js
Created June 15, 2016 01:23
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
@patrickhills
patrickhills / footer-tracking-script.php
Created January 17, 2016 20:01
Wordpress Google Analytics tracking code for downloads/mailto/outbound links.
@patrickhills
patrickhills / wordpressurlupdate
Created July 1, 2015 15:22
Update Wordpress URL
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
@patrickhills
patrickhills / bs3-index.jade
Last active August 29, 2015 14:13
Bootstrap 3 Jade Starter
doctype html
html(lang='en')
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1.0')
meta(name='description', content='')
meta(name='author', content='')
meta(name='keywords', content='')
meta(name='copyright', content='')
link(rel='shortcut icon', href='/assets/ico/favicon.png')
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta name="keywords" content="">
<meta name="copyright" content="">
<link rel="shortcut icon" href="../../assets/ico/favicon.png">