Skip to content

Instantly share code, notes, and snippets.

View terryupton's full-sized avatar

Terry Upton terryupton

View GitHub Profile
@terryupton
terryupton / SassMeister-input.scss
Created February 11, 2014 18:08
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.3)
// Compass (v1.0.0.alpha.18)
// ----
//Service Group Colours
$srv-grp-01-color: #542989;
$srv-grp-02-color: #0079c2;
$srv-grp-03-color: #50b948;
$srv-grp-04-color: #a41984;
<?php perch_content('regionname'); ?>
@terryupton
terryupton / Bas64 Images with Mixture
Created May 27, 2014 14:06
Inline background images as base64 images using Mixture
.my-class {
background-image: inline-image('../img/myimage.png');
background-repeat: no-repeat;
}
@terryupton
terryupton / Remove .php extension in HTAccess
Created May 28, 2014 11:34
Remove .php extension in HTAccess
# ------------------------------------------------------------------------------
# | Remove .php-extension from urls |
# ------------------------------------------------------------------------------
#This removes php extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)/$ $1.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
@terryupton
terryupton / PHP Include server root
Created May 29, 2014 14:55
PHP Include server root
include($_SERVER['DOCUMENT_ROOT'].'/main-functions.php');
@terryupton
terryupton / SassMeister-input.scss
Created July 15, 2014 16:53
Generated by SassMeister.com.
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// Sassifaction (v0.0.4)
// ----
@import "Sassifaction";
//Service Colours
$raw-sienna: #da7d51;
@terryupton
terryupton / SassMeister-input.scss
Created September 23, 2014 13:41
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
.quote-form__item {
animation-name:fadeIn, slideUp;
animation-fill-mode:both;
animation-duration:1s;
@terryupton
terryupton / Domain Record Dig
Created February 15, 2015 17:07
Domain Record Dig
dig +nocmd domain.com any +multiline +all +answer
@terryupton
terryupton / gist:e86ad289dd96f1bc8234
Created June 1, 2015 11:46
PHP Associative Array
<section class="section // section--base // section--fixed">
<div class="container">
<?php
//Array (Feature Title, Feature Description, Icon Class);
$adverts = array (
array('No Call Out Charge','Free quotation for all jobs','no-callout'),
array('Qualified Plumbers','Qualified Gas Safe Engineers','tick'),
array('Free Quotations','No obligation free quotations','contract'),
@terryupton
terryupton / gist:e7637360fedc8e82b43e
Last active August 29, 2015 14:23
Set Last Modified Header
<?php
//MODIFIED HEADER DATE
##################################################################################
function set_headerdate() {
$format = "%a, %d %b %Y %H:%M:%S %z";
// First check if there is a blog post date
if (function_exists('perch_blog_post_field') && function_exists('perch_get') && perch_blog_post_field(perch_get('s'), 'postDateTime', true)) {
$result = perch_blog_post_field(perch_get('s'), 'postDateTime', true);