Skip to content

Instantly share code, notes, and snippets.

View lukewhitehouse's full-sized avatar

Luke Whitehouse lukewhitehouse

View GitHub Profile
@lukewhitehouse
lukewhitehouse / setup-plantuml.md
Last active October 10, 2024 13:05
How to setup and install PlantUML on Mac OSX and VS Code with Homebrew

How to setup and install PlantUML on Mac OSX and VS Code with Homebrew

Documentation around PlantUML and how to setup (especially when you don't typically work in Java) leave a lot to be desired. Here's a quick run down of how to get plantuml setup and running so you can create, edit, preview and export the diagrams (including C4 Model) in VS Code.

First, ensure you have homebrew installed and updated: https://brew.sh/.

Install the temurin JDK, graphviz and plantuml in that order.

brew install --cask temurin
@lukewhitehouse
lukewhitehouse / spots-druid-macros.md
Last active July 21, 2021 23:58
Spots Druid Macros - WoW

Spots Druid Macros

Collection of macros for Druids in World of Warcraft.

Mouseover

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
lukewhitehouse / functions.php
Created November 23, 2016 14:31
WordPress post type permalinks
<?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
lukewhitehouse / .htaccess
Created September 9, 2016 09:04
301 Redirects stuff
# 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 (.*)$ http://www.newdomain.com/$1 [R=301,L]
</IfModule>
@lukewhitehouse
lukewhitehouse / content.html
Last active September 3, 2016 20:27
Lorem Ipsum - full page content
<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>
<p
@lukewhitehouse
lukewhitehouse / readme.md
Created February 24, 2016 10:23
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 [email protected]:Mixd/wp-deploy.git <NEW PROJECT DOMAIN>
  3. run bundle install
  4. run bash config/prepare.sh
  5. run git remote add origin <SSH URL FROM NEW GITHUB REPO>
  6. run git push -u origin master
@lukewhitehouse
lukewhitehouse / readme.md
Last active February 24, 2016 10:24
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
lukewhitehouse / README.md
Last active September 26, 2015 21:44
Sublime Text 3 settings
@lukewhitehouse
lukewhitehouse / README.md
Created September 25, 2015 14:44
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.

@lukewhitehouse
lukewhitehouse / README.md
Created September 24, 2015 11:41
On Animation or Transition end