This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url /people/?name=Tom&gender=male | |
{exp:sherlock:get} | |
<p>{get:name} - {get:gender}</p> | |
{/exp:sherlock:get} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:sherlock:page_type} | |
{if is_pagination} | |
There are a lot of these. | |
{/if} | |
{if is_pagination && is_category} | |
There are a lot of these to filter. | |
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:sherlock:category_id category_url_title="{segment_4}"} | |
{exp:weblog:entries weblog="news" category="{category_id}"} | |
<ul> | |
<li><a href="{url_title_path=" news"}">{title}</a></li> | |
</ul> | |
{/exp:weblog:entries} | |
{if no_results} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Search() { | |
this.isSearching = false; | |
this.searchingObservers = []; | |
} | |
Search.prototype = { | |
search: function(term) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I created a generic Rails like ApplicationController so that you can just | |
# run this code via a command line prompt without the need for Rails | |
module Recorder | |
def self.included(base) | |
base.send(:before_filter, :some_method) | |
base.send(:after_filter, :another_method) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org" | |
gem 'anemone' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var collider = function(string) { | |
var arr = [], | |
parts = string.split('['); | |
for (index in parts) { | |
arr.push(parts[index].replace(']', '')) | |
} | |
return arr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var templateRetrieved = this.getTemplate(); | |
jQuery.when(templateRetrieved).then(jQuery.proxy(function(template){ | |
var html = this.renderTemplate(template, data); | |
this.$el.html(html); | |
}, this)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Toolbox_Template_Form { | |
protected $form_html = NULL; | |
protected $tagdata = ''; | |
protected $options = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
App.start() | |
App = | |
start: -> | |
console.log('test') | |
window.App = App |