Skip to content

Instantly share code, notes, and snippets.

@trek
trek / gist:4154434
Created November 27, 2012 14:18
original notes
https://twitter.com/dagda1/status/231016636847648769
https://twitter.com/garybernhardt/status/227881347346219008/
http://ianstormtaylor.com/rendering-views-in-backbonejs-isnt-always-simple/
backbone: what you'd normally use jquery plugins for, but with an inverted rendering process (js -> DOM instead of DOM -> js)
"islands of richness", jquery data callbacks main pattern.
other frameworks are building out from jQuery's central pattern of DOM selection and event callbacks.
fantastic pattern for adding behavior to documents, but we aren't writing documents.
@ndarville
ndarville / business-models.md
Last active June 13, 2025 01:26
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@ndbroadbent
ndbroadbent / json_munging_patch.rb
Created February 12, 2013 00:24
Save this to config/initializers/json_munging_patch.rb until https://github.com/rails/rails/pull/8862 or an alternative fix is merged.
# Patch from https://github.com/rails/rails/pull/8862
module ActionDispatch
Request.class_eval do
# Remove nils from the params hash
def deep_munge(hash)
hash.each do |k, v|
case v
when Array
@lukemelia
lukemelia / buffered_proxy.js
Last active May 5, 2016 20:47
Buffered Proxy, extracted from Yapp codebase
var empty, get, set,
__hasProp = {}.hasOwnProperty;
get = Ember.get;
set = Ember.set;
empty = function(obj) {
var key;
for (key in obj) {
if (!__hasProp.call(obj, key)) continue;
@machty
machty / router-facelift-guide.md
Last active July 10, 2024 15:14
Guide to the Router Facelift

Ember Router Async Facelift

The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.

@chexton
chexton / button.html
Last active December 18, 2015 07:19
button.html
<!--Start button-->
<table cellspacing="0" border="0" cellpadding="8" width="240">
<tr>
<td height="35" bgcolor="#33CC33" style="border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -khtml-border-radius: 5px; font-size: 16px; font-family: sans-serif; color: #333333; margin: 0; padding: 0; text-align: center;" class='vero-editable'>
<a href="http://getvero.com" style="font-weight:bold; text-decoration:underline;color: #ffffff;text-decoration:none;">Check out your cart &rarr;</a>
</td>
</tr>
</table>
<!-- End button-->
App.Store = DS.Store.extend
pushRecord: (type, record) ->
key = type.underscore().pluralize()
payload = {}
payload[key] = [record]
@pushPayload type, payload
@getById type, record.id
@machty
machty / router-js-refactor-architecture.md
Last active July 31, 2019 18:39
Overview of the architecture and approach to the router.js refactor

router.js Architecture

Let this serve as a guide for anyone who'd like to dig into router.js's internals, understand what's going on, and hopefully contribute!

Scope of router.js (et al)

router.js is most popularly known as the routing microlib used by the Ember.js Router, though other folk have been known to use it beyond Ember, including some Angular folk who weren't satisfied with

@coderberry
coderberry / chrome-cheat-sheet.md
Last active March 10, 2023 13:56
Chrome Canary Console Cheat Sheet
@rwjblue
rwjblue / computed_on_pojos.js
Created December 13, 2013 15:24
Using Ember.computed on a Plain Old Javascript Object.
pojo = {awesome: false};
Ember.defineProperty(pojo, 'computedAwesomeness', Ember.computed.not('awesome'));
alert("Computed Awesomeness: " + Ember.get(pojo, 'computedAwesomeness'));