I ran into a problem recently where I needed to perform a regex replace on a string and also manipulate the string captured in a capture group at the same time. What I discovered is that its valid to pass a function as the second argument to the replace function […]
Yearly Archives: 2013
ios7 appears to have broken input fields for a number of web applications. Input fields now take two taps to allow the user to input data even though the keyboard is brought up after only one click. Here’s a hack to fix the input fields for any of your webapps […]
ios7 form input patch
Here is a MongoDB script for presenting index information in a more concise way than getIndexes() provides. This script also presents an index’s total size along with a breakdown of its size on all of the shards. //mongo --eval="var collection='file';" var ret = db[collection].getIndexes().map(function(i){ return {"key":i.key, "name":i.name}; }); var o […]