Khebbies blog
  • Home
Sign in Subscribe

mongo

A collection of 3 posts
mongo

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
Oct 31, 2014 1 min read
mongo

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
Oct 29, 2014 1 min read
mongo

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
May 15, 2014 1 min read
Page 1 of 1
Khebbies blog © 2025
Powered by Ghost