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;
  }
}]);

Run GIT GC in all subdirectories

Find the release directories and run git gc in each.

find ./ -maxdepth 1 -type d -exec git --git-dir={}/.git --work-tree={} gc \;

Semi Forward Foot Controls for Sportsters ’86 and ’03

These controls place your feet in between the stock mid position and forward controls.4-020bb_s


Short MongoDB Fields with Mongoid

Need to have shorter field name in MongoDB, but still use readable names in code?

# Mongoid Timestamps
include Mongoid::Timestamps::Short

# fields
field :aid, as: :application_id, type:String

# one to one
embeds_one :address, :store_as => :ad

# collections
field :aid, as: :application_id
belongs_to :application, foreign_key: :aid

On Writing – Steven King

Part biography and part writing advice. Both were interesting.

The advise that jumped out is, Do The Work. For writing that’s writing and reading. Which translates well for most things into doing and learning/observing.

On Writing


Brutalist Framework