Why ROXIMITY Selected MongoDB – Compose.io

When we initially started development of ROXIMITY, I decided to go with MongoDB. There were three reasons for this choice: Geospatial support, redundancy and scalability and a lack of schema. If you are thinking about MongoDB, these are still all valid reasons for considering it and our experience should aid your decision making. read more

Capistrano 2 rolling task

This took a long time to track down, but this will allow rolling deploys or tasks with Capistrano 2.x.

task :rolling, roles: :web do 
    find_servers_for_task(current_task).each do |s|
        puts roles[:web].clear()
        server s.host, :web
        puts "Deploying to #{s.host}..."
        find_and_execute_task('deploy')
    end
end

Ref: https://groups.google.com/forum/#!topic/capistrano/H-tizsMN2Tk

AngularJS dynamic filter

/*
 * Use this to dynamically pass a filter from a controller or somewhere else 
 * as a string. It will use DI to lookup the filter and apply it.
 *
 * In the template:
 *
 *     {{row.label | date | dynamic:nameFilter }}
 *
 * In the controller:
 *
 *     $scope.nameFilter = 'mycustomerfilter'; 
 */
app.filter('dynamic', ['$injector', function($injector) {
  return function(text, filter) {
    var result = text;
    if (filter) {
      var f = $injector.get(filter + "Filter");
      if (f) { result = f(text); }
    }
    return result;
  }
}]);