Skip to content

Instantly share code, notes, and snippets.

@noahlz
noahlz / concajconsliststar.clj
Created May 3, 2013 15:49
concat vs. conj vs. cons vs. list vs. list*
user=> (concat '(1 2 3) '(4 5 6))
(1 2 3 4 5 6)
user=> (conj '(1 2 3) '(4 5 6))
((4 5 6) 1 2 3)
user=> (cons '(1 2 3) '(4 5 6))
((1 2 3) 4 5 6)
user=> (list '(1 2 3) '(4 5 6))
@mikeknoop
mikeknoop / backbonecache.coffee
Created February 7, 2012 05:12
Backbone Simple Cache
###
Lightweight Backbone Cache
Mike Knoop, 2012 (knoopgroup.com, zapier.com)
Simply execute this script file sometime after you load Backbone.
It hooks into the Backbone sync function to give a lightweight local
cache for models and collections. Will work for both models and collections.
Only GET requests are eligible for cacheing and caches are stored by URL.
@gre
gre / pusher.scala
Created August 6, 2011 14:38
Using Pusher API with Play framework in scala for publishing events
// Implementing the publishing Pusher REST API
// @see http://pusher.com/docs/rest_api
// with Play (scala) Framework
// @see http://scala.playframework.org/
class Pusher {
val appId = Play.configuration.getProperty("pusher.appId")
val key = Play.configuration.getProperty("pusher.key")
val secret = Play.configuration.getProperty("pusher.secret")