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 »

EventBus in a Sinatra app

I had a sinatra app (the Be My Eyes app), that I thought had a bit too much code in the route file. So I investigated how to make that better. What I came up with was that it would be great to have some kind of EventBus, where I ... Read more »

Frontend developers and their tools

I read some frontend developer magazines like net magazine and Web Designer Magazine. Now I really like both of them, and so I thought about how great it would be to have something like that for backend developers (or maybe full stack developers). And I thought about why it is ... Read more »

Git bisect

Oh how I love git bisect In the last couple of weeks I had some bugs that were introduced at a unknown commit. Actually I couldn't even find out what code was working wrong. I did however know excactly what was wrong in the UI. For problems like this git ... Read more »

My Mac Setup

This is just a run through of my Mac setup - I do this mostly for myself, so I can find it whenever I need to setup a Mac, but you are welcome to take a peek :-) First of all Caps Lock (I never hit Caps Lock except by ... 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 »

Heroku like deployment for your cloud host / VPS

For Be My Eyes I have set up a heroku like deployment environment Basically I followed this approach: https://www.digitalocean.com/community/articles/how-to-set-up-automatic-deployment-with-git-with-a-vps But there is one problem with the above approach, and that is that I want to be able to push other branches than master to ... Read more »