Skip to content

Instantly share code, notes, and snippets.

View willtonkin's full-sized avatar
💭
I may be slow to respond.

Will Tonkin willtonkin

💭
I may be slow to respond.
View GitHub Profile
@willtonkin
willtonkin / my haml override.
Created November 15, 2012 11:56 — forked from davesag/my haml override.
i18n aware haml and erb template loader for Sinatra
helpers do
def haml(template, options = {}, *)
# template will either be the name of a template or the body of a template.
# if it's the body then it will contain a "%" symbol and so we can skip any processing
template_name = template.to_s
do_not_localise = false
if template_name.include?('%')
@willtonkin
willtonkin / my haml override.
Created November 15, 2012 11:57 — forked from davesag/my haml override.
i18n aware haml and erb template loader for Sinatra
helpers do
def haml(template, options = {}, *)
# template will either be the name of a template or the body of a template.
# if it's the body then it will contain a "%" symbol and so we can skip any processing
template_name = template.to_s
do_not_localise = false
if template_name.include?('%')
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
/*
_______
These simple SCSS mixins for Foundation4 are made by me to deal with media-queries and have a clean code at the same time! ;)
****IMPORTANT****
Due to Foundation 4 uses mobile-first methodology, every $phone-"X" variable in these mixins defines the value for every screen size.
$desktop-"X" values overrides $phone-"X" values when window width is 768px and above.
So, to simplify this, we can think that way: ($phone-"X" < 768px => $desktop-"X")
Set up your file structure for the innerParsys component:
innerParsys
-> parsys
-> new
- _cq_editConfig.xml
- .content.xml
- _cq_editConfig.xml
- .content.xml
- parsys.jsp
// Filter search to only show post type of post
function SearchFilter($query) {
if ($query->is_search) {
$query->set('post_type', 'post');
}
return $query;
}
add_filter('pre_get_posts','SearchFilter');
@willtonkin
willtonkin / aem-debug
Created December 7, 2016 10:47 — forked from gabrielwalt/aem-debug
Run AEM in debug mode
java -jar cq-quickstart-6.0.0.jar -debug 10123
@willtonkin
willtonkin / Vagrantfile
Last active March 2, 2017 12:11 — forked from jbalzar/Vagrantfile.rb
Set scotchbox default document root to /var/www
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
@willtonkin
willtonkin / no-frills-social-sharing-urls.md
Last active September 25, 2017 14:47 — forked from mikedidthis/no-frills-social-sharing-urls.md
No Frills Social Sharing URLs

No Frills Social Sharing URLs

Not a huge fan of share buttons in general, but people seem to like them. Below is a list of social networks and their respective, good ol' fashion, URLs for sharing content.

[TITLE] indicates where to add your own title, url, description etc. Do not include the square brackets.

Feel free to add / update them, either in the comments or a fork.

Facebook