This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="angular.d.ts" /> | |
/// <reference path="angular-resource.d.ts" /> | |
interface IEmployee extends ng.resource.IResource<IEmployee> | |
{ | |
id: number; | |
firstName : string; | |
lastName : string; | |
} | |
interface IEmployeeResource extends ng.resource.IResourceClass<IEmployee> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backbone.Collection.prototype.update = function(col_in){ | |
var that = this, | |
ids = []; | |
var cur_ids = that.pluck('id'), | |
new_ids = _(col_in).pluck('id'), | |
to_remove = _(cur_ids).difference(new_ids); | |
this.remove(to_remove); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upgrade to OS X Lion, notice your virtualenvs are all hosed. | |
# Install Xcode 4.1 from the app store (or //fs2/IT/Apple/). | |
# Make sure to actually *run* the install, it's an app inside Applications. Throw it away afterwards, if you want the space back. | |
sudo easy_install pip | |
sudo pip install virtualenv virtualenvwrapper ipython | |
# blow the old one(s) away | |
rmvirtualenv playdoh |