Skip to content

Instantly share code, notes, and snippets.

@iaindooley
iaindooley / feedback_roulette_questions.txt
Created September 7, 2011 23:45
Feedback Roulette Questions
*** PLEASE MAKE SURE YOU READ THESE NOTES ***
We're experimenting with different styles of copy writing for a site we're about to launch.
We have submitted 3 almost identical sites, but with different copy writing variations. If you've already seen one of the other variations, we'd appreciate it if you skip reviewing one of the alternatives.
The sites have no visual design so we're focusing on getting reactions to the style of writing and information architecture *ONLY*!!
As a rough guide, we'd like to find out some of the following things:
@iaindooley
iaindooley / mustache_logic.txt
Created November 26, 2011 05:05
Mustache has logic
<h1>{{header}}</h1>
{{#bug}}
{{/bug}}
{{#items}}
{{#first}}
<li><strong>{{name}}</strong></li>
{{/first}}
{{#link}}
<li><a href="{{url}}">{{name}}</a></li>
@iaindooley
iaindooley / traditional_templating.txt
Created November 26, 2011 05:47
Traditional separation of concerns in templating engines
+----------------------+ +---------------------+
| Controller/App layer | | View/template layer |
|----------------------| |---------------------|
| Responsible for some | | Responsible for |
| logic arbitrarily +------->| fragmentation and |
| defined as being | | some logic |
| business logic | | arbitrarily defined |
| | | as display logic |
+----------------------+ +---------------------+
@iaindooley
iaindooley / conditional_includes.txt
Created December 11, 2011 04:08
Conditional Includes in Template Animation
When the user is not logged in:
<div id="content" class="noSidebar">
<div id="main">
<!-- STUFF GOES IN HERE //-->
</div>
</div>
Now imagine that for some really good technical reason, we need to remove that noSidebar class when we add a sidebar:
@iaindooley
iaindooley / subtractive_logic.txt
Created December 11, 2011 04:03
Subtractive Logic in Template Animation
<form>
<dl class="error" id="whatevsError">
<dt>You have to do something about this</dt>
<dd>The reason we ask you do do this is so that we can laugh all the way to the bank</dd>
</dl>
<dl>
<dt><label for="whatevs">Whatevs:</label</dt>
<dd><input type="text" name="whatevs" id="whatevs" /></dd>
</dl>
</form>
@iaindooley
iaindooley / mung_keywords.php
Created February 15, 2012 23:27
Code for generation broad, exact and phrase match keywords with optional modified broad combinations
<?php
if(isset($argv[2]) && $argv[2])
define('MODIFIED_BROAD',1);
else
define('MODIFIED_BROAD',0);
$lines = file($argv[1],FILE_IGNORE_NEW_LINES);
$res = array();
foreach($lines as $line)
@iaindooley
iaindooley / adwords_keyword_insertion.txt
Created August 18, 2012 04:30
Dynamic keyword insertion with AdWords
http://www.yoursite.com/?kw={keyword:default}
@iaindooley
iaindooley / gist:3385952
Created August 18, 2012 10:31
Wufoo Default Values Example
'defaultValues':'field5=wufoo&field6=today',
@iaindooley
iaindooley / wufoo_default_values_keyword.txt
Created August 18, 2012 10:46
Wufoo Default Values for Adwords Keyword
'defaultValues':'field7='+window.location.href.replace(/.*kw=(.+)$/,"$1"),
@iaindooley
iaindooley / optimizely_version_html.txt
Created August 18, 2012 11:01
Optimizely Version HTML
<div id="optimizelyVersion" style="display:none;">Default Version</div>