Oct 16 2010
- 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments
In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].
./configure \ | |
--prefix=/usr \ | |
--mandir=/usr/share/man \ | |
--infodir=/usr/share/info \ | |
--sysconfdir=/private/etc \ | |
--with-apxs2=/usr/sbin/apxs \ | |
--enable-cli \ | |
--with-config-file-path=/etc \ | |
--with-libxml-dir=/usr \ | |
--with-openssl=/usr \ |
// Very simple. Just handles the process of | |
// display an unordered list of movies, | |
// while providing the ability to edit each movie | |
// and update the model. | |
// Any glaring bad practices? Still in the early | |
// Backbone learning stages. | |
(function(Movie) { |
<!doctype html> | |
<html> | |
<head> | |
<title>Web Workers</title> | |
</head> | |
<body> | |
<script id="worker" type="app/worker"> | |
addEventListener('message', function() { | |
postMessage('What up, sucka.'); |
full_width = 80 | |
columns = 12 | |
gutter = 1 | |
.container | |
width unit(full_width, '%') | |
margin auto | |
overflow hidden | |
div[class^="grid_"] |
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
Autosave from Chrome Notes: | |
Watch: http://addyosmani.com/blog/autosave-changes-chrome-dev-tools/ | |
Installation Instructions: https://github.com/NV/chrome-devtools-autosave | |
Afraid of Node? Here's a one-click install: https://sites.google.com/site/nodejsmacosx/ | |
To monitor changes, you have to run `node chrome-devtools-autosave-server/index.js` in the Terminal. This is hard to remember, | |
so create an alias. Run |
Events = (function( $ ) { | |
// Store each registered $.Callbacks object by namespace | |
var cache = {}, | |
slice = [].slice; | |
return { | |
// Bind callback to event | |
bind : function( ev, callback, options ) { | |
Events = (function( $ ) { | |
// Store each registered $.Callbacks object by namespace | |
var cache = {}, | |
slice = [].slice; | |
return { | |
// Bind callback to event | |
bind : function( ev, callback, options ) { | |
// Todoapp using Localstorage | |
/*global window */ | |
/*global document */ | |
(function () { | |
"use strict"; | |
window.todoApp = { | |
addTodoBtn: document.getElementById("addTodo"), |