Filter by:
Sort by:

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 »

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 »

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 »