Skip to content

Instantly share code, notes, and snippets.

@low
low / gist:3689381
Created September 10, 2012 07:14
Avoid using a tag as parameter value for another tag

Avoid using a tag as parameter value for another tag in ExpressionEngine

Instead of this:

{exp:channel:entries param="{exp:some:plugin}"}
	...
{/exp:channel:entries}

Either use an embed, like this:

@timkelty
timkelty / default.html
Created August 28, 2012 19:12
Using Stash for parsing "needles" out of content fields (similar to techniques using Copee Pastee/LG Replace)
{!-- embed page template --}
{embed="site/_page"
hide_site_title="{embed:hide_site_title}"
body_class="p-default"
}
{!-- get channel data --}
{exp:channel:entries
limit="1"
entry_id="{embed:entry_id}"
@kirbysayshi
kirbysayshi / README.md
Created August 24, 2012 22:16
JS Module Guards

This Is Absolutely Tiring

Every time I start a node module, or a new JS project, I'm confronted with this same question: how do I structure it to allow it to be used in the browser or nodejs, without requiring a build step, and without getting in the way of my development?

While developing, I typically create some type of [browser-based environment][]; Firebug and Web Inspector are still miles ahead of anything else we've got. Ideally I want to be able to add a file via a script tag, and have that be the only requirement.

As @visionmedia [points out][], this is [ridiculous][].

This gist is meant to compile all of the various ways I've seen of guarding against/for a variety of module systems. Fork it and add your own, I'll try to bring them into this one.

@pauloelias
pauloelias / README.md
Created August 23, 2012 16:57
Extended ExpressionEngine .htaccess/apache conf

ExpressionEngine .htaccess/Apache conf

Please use these at your own risk. I cannot be responsible for having no idea what I am doing and breaking your server.

This is a collection of Apache configuration settings that I use in my ExpressionEngine projects. Since I have always been a big fan of the HTML5 Boilerplate I took inspiration from their .htaccess file and tweaked my configuration with other settings I have used over the years.

This gist contains:

  • _EXTENDED.htaccess This is a general .htaccess file I rename and edit as needed for each site. Note: When I host a site on my prad/stage/dev servers I move most or all of these rules into the vhost.conf file
  • _SAMPLE.httpd.conf I use Ubuntu on my development, staging, and production servers so this is specific to Apache 2 on my setup. Essentially this file extends the apache2.conf (in my setup).
@johnwbaxter
johnwbaxter / sublimeLinterUserSettings
Created August 21, 2012 17:14
SublimeText SublimeLinter User settings. Paste here: Preferences->Package Settings->SublimeLinter->Settings - User
{
"sublimelinter_mark_style": "fills",
"csslint_options":
{
"adjoining-classes": false,
"box-model": false,
"box-sizing": "warning",
"compatible-vendor-prefixes": "warning",
"display-property-grouping": true,
"duplicate-background-images": "warning",
@eknuth
eknuth / app.js
Created July 29, 2012 22:26
Google FastButtons as knockout.js custom binding
ko.applyBindings({
fastClickResult: ko.observable("Waiting..."),
clickResult: ko.observable("Waiting..."),
handleClick: function(self, event) {
self.clickResult("Clicked!");
},
handleFastClick: function(self, event) {
self.fastClickResult("Fast Clicked!");
}
});
@john-henry
john-henry / gist:3179683
Created July 26, 2012 01:07
Infinite Scroll & Masonry in ExpressionEngine
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
@markterpstra
markterpstra / low-variables-magic
Created July 24, 2012 20:52
Low Variables Magic - Nesting, Preparsing, Var Types, etc
First I'm using the Low Variables Single tag to pull in a Textarea var type for the country-specific header,
using the preparse: paramter to pass the {lang} and {segment_1} vars...
<div id="header">
{exp:low_variables:single var="lv_header_{lang}" preparse:lang="{lang}" preparse:segment_1="{segment_1}"}
</div>
Then inside the above {lv_header_{lang}} var, I have the country-specific logo, contact info, nav menu, etc.
For the nav menu, I'm using a Low Variables Pair tag to output a nested Playa var type...
@chrislkeller
chrislkeller / README.md
Last active December 18, 2020 08:12
SpreadSheet To Fusion Tables

Script to sync a Google SpreadSheet to a Fusion Table

Save for a few legacy projects that still use Fusion Tables I don't actively use this script anymore. This update hopefully solves the OAuth issue that cropped up once Google depcricated the Client Login method used by the prior version.

As always, your mileage may vary, and I welcome someone -- Google or otherwise -- to offer a long-term maintained solution.

The following is largely cribbed from a Google example here. I try to explain some of the API settings that must be enabled in the Developer's Console and elsewhere

Create your spr

@objectivehtml
objectivehtml / index.html
Created June 18, 2012 16:53
Simple Stash Embed Usage
{exp:stash:set type="snippet"}
{stash:search_header}
<input type="hidden" name="current_page" value="{current_page}" />
<input type="hidden" name="total_pages" value="{total_pages}" />
<section class="clear products grid">
<div class="sort orange row">