Skip to content

Instantly share code, notes, and snippets.


Luke Whitehouse lukewhitehouse

View GitHub Profile
lukewhitehouse /
Last active Jul 21, 2021
Spots Druid Macros - WoW

Spots Druid Macros

Collection of macros for Druids in World of Warcraft.


Spells cast on a friendly player or yourself

Any non-harmful mouseover macros here will attempt to target a friendly target, failing that it will cast the spell on yourself.

lukewhitehouse / functions.php
Created Nov 23, 2016
WordPress post type permalinks
View functions.php
* Modify Work permalink to add in category
function mixd_work_permalink_setup( $post_link, $id = 0, $leavename = FALSE ) {
// Test params are anywhere within the URL
if ( strpos('%work_type%', $post_link) === 0 ) {
return $post_link;
} else {
lukewhitehouse / .htaccess
Created Sep 9, 2016
301 Redirects stuff
View .htaccess
# Redirect entire site from old to new domain
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
RewriteRule (.*)$$1 [R=301,L]
lukewhitehouse / content.html
Last active Sep 3, 2016
Lorem Ipsum - full page content
View content.html
<p>Duis sodales orci sed est laoreet egestas. Praesent in egestas nulla, vel elementum urna. Nunc auctor metus ut leo condimentum, ut gravida eros luctus. Aliquam et ullamcorper nulla, non tincidunt orci. In scelerisque <strong>iaculis tellus</strong> vitae maximus. Curabitur vulputate odio quis ipsum ornare, quis vestibulum lorem porttitor. Ut efficitur enim in nibh maximus interdum. Praesent vel <a href="#">lorem sit amet</a> dui molestie suscipit in vel nibh.</p>
<h2>Heading number 2</h2>
<p>Proin quis mauris a purus facilisis sollicitudin. Ut pharetra magna eget molestie finibus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam sit <em>amet nisi</em> pellentesque, venenatis tellus quis, congue mauris. Class aptent taciti sociosqu <u>ad litora torquent</u> per conubia nostra, per inceptos himenaeos. Etiam quam arcu, accumsan mollis semper sit amet, semper ac ligula. Sed at convallis lacus. Morbi egestas <q>leo et sapien</q> commodo, sed finibus mi aliquet.</p>
lukewhitehouse /
Created Feb 24, 2016
Setting up a new wpdeploy project locally

Here's what you'll need to do to setup a new site locally...

NOTE: You won't be able to do this till I've added your SSH key and IP address to the server.

  1. Create a new repository based on the domain of the site.
  2. Run git clone <NEW PROJECT DOMAIN>
  3. run bundle install
  4. run bash config/
  5. run git remote add origin <SSH URL FROM NEW GITHUB REPO>
  6. run git push -u origin master
lukewhitehouse /
Last active Feb 24, 2016
Setting up an existing wp-deploy project locally

Here's what you'll need to do to set the site up locally...

NOTE: You won't be able to do this till I've added your SSH key and IP address to the server.

  1. run git clone --recursive <SSH URL FROM GITHUB>
  2. Go into the dev branch - git checkout development
  3. run bundle install
  4. Copy config/database.example.yml to config/database.yml and add in your local database (you'll need to create one) as well as the database details from the spec doc (link in email).
  5. Set your vhosts up as the domain found within the wp_localurl variable within config/deploy.rb Line 14. (this is required!)
  6. run bundle exec cap staging wp:setup:local
lukewhitehouse /
Last active Sep 26, 2015
Sublime Text 3 settings
lukewhitehouse /
Created Sep 25, 2015
Scroll to element on click

Scroll to element on click

This script gets the href attribute from the element and scroll the window down to that location.


Social media sharing links

Simple social media links for your projects. Initially created for WordPress projects, however, extremely flexible and easily modified.


Add this partial to your PHP file, or port this into another language as you see fit.