Filter by:
Sort by:

Map Reduce in MongoDb

I had a problem where I needed to aggregate some documents in MongoDb. In Be My Eyes, we keep records of which version of ios the app is installed on. We do this to know which versions to support. The natural solution would be to use the aggregation framework, however ... Read more »

Unix commandline

Just a few scripts useful for changing many files at once. To replace all double quoted strings with single quoted strings in ruby to make rubocop happy: find . -type f -iname '*.rb' -exec sed -i.bak "s/\"/'/" "{}" +; Now find all the places where you do string interpolation and ... Read more »

Update all records in mongodb

Recently we discovered a problem in Be My Eyes where an id was not unique. So we needed a quick fix to make all ids a forthrunning unique number before solving the problem in the code. On stackoverflow i found this question: http://stackoverflow.com/questions/4146452/mongodb-what-is-the-fastest-way-to-update-all-records-in-a-collection And I ... Read more »