The SICP page recommends MIT scheme,
so that is what we will use
to install it, on Apple OSX using Homebrew:
brew tap x11
brew cask install xquartzThe SICP page recommends MIT scheme,
so that is what we will use
to install it, on Apple OSX using Homebrew:
brew tap x11
brew cask install xquartz| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| context "GET index" do | |
| #context "POST create" do | |
| #context "GET show" do | |
| #context "PATCH update" do (or PUT update) | |
| #context "DELETE destroy" do | |
| #context "GET new" do |
Figure out a good standard for how to use the HTTP response codes in a 'truly RESTful' (Now called 'Hypermedia API' apparently) way.
with a hat tip to Sublime Text 2 Shortcuts
| ⌘; | autocomplete |
| ⌘⌥B | instant replay |
| ⌘⌥E | search across all tabs |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
| module HashConverter | |
| class << self | |
| def to_underscore hash | |
| convert hash, :underscore | |
| end | |
| def to_camel_case hash | |
| convert hash, :camelize, :lower | |
| end | |
| def convert obj, *method | |
| case obj |
| /* Scaled-down Backbone.js demonstration | |
| * By Jacob Oscarson (http://twitter.com/jacob414), 2010 | |
| * MIT Licenced, see http://www.opensource.org/licenses/mit-license.php */ | |
| $(function() { | |
| window.ulog = function(msg) { $('#log').append($('<div>'+msg+'</div>')); } | |
| // Faking a little bit of Backbone.sync functionallity | |
| Backbone.sync = function(method, model, succeeded) { | |
| ulog('<strong>'+method + ":</strong> " + model.get('label')); | |
| if(typeof model.cid != 'undefined') { |
| // | |
| // Backbone.Rails.js | |
| // | |
| // Makes Backbone.js play nicely with the default Rails setup, i.e., | |
| // no need to set | |
| // ActiveRecord::Base.include_root_in_json = false | |
| // and build all of your models directly from `params` rather than | |
| // `params[:model]`. | |
| // | |
| // Load this file after backbone.js and before your application JS. |
| var inherit = (function () { | |
| var F = function () {}; | |
| return function (C, P) { | |
| F.prototype = P.prototype; | |
| C.prototype = new F(); | |
| C.uber = P.prototype; | |
| C.prototype.constructor = C; | |
| }; | |
| }()); |
| /** | |
| * @memberOf __module | |
| * @type module | |
| */ | |
| var module = (/** @constructor */ function() { | |
| function privateMethod() { | |
| ... | |
| } |