Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
| #!./bin/knife exec | |
| # A knife exec script to change chef node's name, preserving all the attributes. | |
| # | |
| # Usage: knife exec rename-node.rb old-name new-name | |
| # | |
| # Script retrieves the Node object, changes its 'name' attribute, | |
| # creates new Node object with updated name and rest of attributes | |
| # untouched. Then it deletes old Node and Client objects from | |
| # database, and logs into the server to update it: |
| #This is the "site config" for nginx | |
| upstream django { | |
| # Distribute requests to servers based on client IP. This keeps load | |
| # balancing fair but consistent per-client. In this instance we're | |
| # only using one uWGSI worker anyway. | |
| ip_hash; | |
| server unix:/tmp/uwsgi.sock; | |
| } | |
| server { |
Eventually platforms outgrow the single-source-tree model and become distributed systems. A common pattern in these distributed systems is distributed composition via event buffering. Here we motivate and describe this event buffering pattern.
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| /** | |
| * A useful little pagination collection extension. Handles two | |
| * types of collections: | |
| * 1. Those where the number of pages is discoered on first page | |
| * 2. Those whose number of pages is known in advance. | |
| * Used by startup Collection and Trends collection. | |
| */ | |
| ST.Collections.PaginatedCollection = Backbone.Collection.extend({ | |
| initialize : function(attributes, options) { |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| /* | |
| ** Client side - /public/src/app.js | |
| */ | |
| var myApp = { | |
| // Collections | |
| Collections: { | |
| list: Backbone.Collection.extend() | |
| }, | |
| // Views |