Skip to content

Instantly share code, notes, and snippets.

View paultibbetts's full-sized avatar

Paul Tibbetts paultibbetts

View GitHub Profile
@paultibbetts
paultibbetts / jekyll.ics
Created September 22, 2016 16:09 — forked from woodworker/jekyll.ics
a jekyll template for icalendar file
---
layout: none
---
BEGIN:VCALENDAR
VERSION:2.0
PRODID:http://www.example.com/
METHOD:PUBLISH
{% for post in site.posts limit:10 %}BEGIN:VEVENT
UID:{{ post.date | date: "%Y%m%d" }}@example.com
ORGANIZER;CN="Organizer Name":MAILTO:organizer@example.org
// assets/scripts/customizer.js
(function($) {
// Primary colour
wp.customize('primary_colour', function(value) {
value.bind(function(to) {
$('head').append('<style>.Primary-bg-c{background-color:'+ to +' !important;}</style>');
$('head').append('<style>.Primary-c{color:'+ to +' !important;}</style>');
$('head').append('<style>.Primary-c--hover:hover{color:'+ to +' !important;}</style>');
@paultibbetts
paultibbetts / _wp-classes.scss
Last active June 16, 2016 14:17
WordPress classes in SCSS, set to Bootstrap defaults
// WordPress Generated Classes
// http://codex.wordpress.org/CSS#WordPress_Generated_Classes
// Media alignment
.alignnone {
margin-left: 0;
margin-right: 0;
max-width: 100%;
height: auto;
}
@paultibbetts
paultibbetts / acf-page-ancestor-location-rule.php
Last active May 9, 2016 13:03 — forked from Hube2/acf-page-ancestor-location-rule.php
Advanced Custom Fields - Page Ancestor Custom Location Rule
<?php
/*
ACF custom location rule : Page Ancestor
*/
add_filter('acf/location/rule_types', 'acf_location_rules_page_ancestor');
function acf_location_rules_page_ancestor($choices) {
$choices['Page']['page_ancestor'] = 'Page Ancestor';
return $choices;
}
@paultibbetts
paultibbetts / -comparing-breakpoints-in-frameworks-toolkits.md
Last active April 16, 2024 13:07
Comparing Breakpoints in CSS Toolkits and Frameworks

dt-

Parses an element as a date/time

<time class="dt-published" datetime="2013-05-02 12:00:00" />
  • dt-anniversary
  • dt-bday
  • dt-duration
  • dt-end
@paultibbetts
paultibbetts / postcss-migration.md
Last active March 19, 2016 17:06
I migrated from Sass to PostCSS this weekend, this is how it went
  • postcss
  • precss
  • postcss-css-variables with fallbacks
  • postcss-map for yml config files
  • doiuse (unsure how to use as plugin)
  • css-colorguard
  • postcss-bem-linter (could get it to work with components but not utilities)
  • stylelint (working with very basic rules)
  • postcss-inline-svg (needed for work not Cardigan toolkit)
  • postcss-font-magician (needed for work not Cardigan toolkit)
@paultibbetts
paultibbetts / vagrant-passwordless-exports
Last active January 30, 2016 15:44
Allows Vagrant (1.8.1) passwordless access to modify /etc/exports - tested on Mac
# Add this to the sudoers file with `sudo visudo`
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports
%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE
sudo pip install -I ansible==1.9.0.1