Skip to content

Instantly share code, notes, and snippets.

View kmgdevelopment's full-sized avatar

Kristen Grote kmgdevelopment

View GitHub Profile
@kmgdevelopment
kmgdevelopment / gist:2ea31d2aaceb1265a4f5a486c51da8c2
Created March 30, 2016 04:02
Regex: Split HTML Text Elements
<(p|ul|ol|h1|h2|h3|h4|h5|h6|div|table|blockquote)>[.\S\s]*?<\/(p|ul|ol|h1|h2|h3|h4|h5|h6|div|table|blockquote)>
@objectivehtml
objectivehtml / gist:cfa307e78e0a35a4e52b
Created October 28, 2014 18:50
Difference Between parse_variables_row and parse_variables
ee()->TMPL->parse_variables_row(array(
'var_1' => 1,
'var_2' => 2,
'var_3' => 3
));
ee()->TMPL->parse_variables(array(
array(
'var_1' => 1,
'var_2' => 2,
@kmgdevelopment
kmgdevelopment / gist:8794724
Created February 3, 2014 23:40
In-Field Form Labels
$('form[data-infield]').on('keyup', 'input[type="text"], input[type="email"], textarea', function(){
var input = $(this);
input.toggleClass('not-empty', !!input.val());
});
@adamwiggall
adamwiggall / Keep Directories
Last active December 20, 2015 18:38
Often you have a directory in a git repo that you want to share amongst developers, but you don't want the contents tracked. As git ignores empty directories, if you just .gitignore the directory completely it will never get added to the repo and shared. The example shows how to use this technique for the cache folder in an expressionengine inst…
From the command line
$ touch your/path/to/expressionengine/cache/.gitkeep
In your .gitignore file
your/path/to/expressionengine/cache/*
!your/path/to/expressionengine/cache/.gitkeep
@linssen
linssen / ee1x_cookies.md
Created May 22, 2012 08:47
ExpressionEngine cookies

ExpressionEngine 1.x cookies

This document outlines all of the cookies use by ExpressionEngine 1.x. With the EU cookie law coming into force on May 26th, it's important to know what cookies are set, which are 'essential' and why they are there. Hopefully this will help advise your decision process when altering your site to adhere.

I haven't yet gotten to any special addons etc. or even forums or comments. Please do fork and and send pull requests if you'd care to add anything.

Non essential

@barockok
barockok / Premailer.php
Created January 10, 2012 20:39 — forked from Synchro/Premailer.php
PHP interface class for the Premailer API
<?php
/**
* Premailer API PHP class
* Premailer is a library/service for making HTML more palatable for various inept email clients, in particular GMail
* Primary function is to convert style tags into equivalent inline styles so styling can survive <head> tag removal
* Premailer is owned by Dialect Communications group
* @link http://premailer.dialect.ca/api
* @author Marcus Bointon <[email protected]>
*/