Skip to content

Instantly share code, notes, and snippets.

@lukewhitehouse
lukewhitehouse / README.md
Last active September 10, 2015 11:01
Check for if an element is in view

Check for if an element is in view

This script allows you to tell when an element becomes visible in the browser window. You can use this to apply styling/animations to elements.

Instructions

Add this to your javascript. Make sure jQuery is called before this script.

Requirements

  • jQuery
@lukewhitehouse
lukewhitehouse / README.md
Last active May 1, 2016 08:35
Sublime Text: Snippets

Sublime Text: Snippets

A collection of snippets that are pretty useful for Sublime Text.

Contents

dump.sublime-snippet

This allows you to quickly print out a vardump() wrapped between <pre> tags, which is ten times easier to read.

print.sublime-snippet

This allows you to quickly print out a print_r() wrapped between `` tags, which is ten times easier to read.

@lukewhitehouse
lukewhitehouse / README.md
Last active January 1, 2018 03:46
Remove Categories/Tags in WordPress

Remove Categories/Tags in WordPress

This code completely removes the category & tag taxonomies from WordPress which are available by default.

Instructions

Put this snippet within your functions.php within your WordPress theme.

@lukewhitehouse
lukewhitehouse / README.md
Created September 15, 2015 20:32
Social media links

Social media sharing links

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

Instructions

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

@lukewhitehouse
lukewhitehouse / README.md
Created September 24, 2015 11:41
On Animation or Transition end
@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
Last active September 26, 2015 21:44
Sublime Text 3 settings
@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
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 git@github.com: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 / 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