So on the mongodb-user group we get a question at least once a week from some one wishing to understand how to optimise paging for MongoDB. The most common variants are: Facebook like feeds Twitter like feeds Log pagination Historical Data Pagination Statistical Pagination Now first thing to remember in MongoDB is that some times [...]
Ok so you’ll remember some time ago I talked about realtime statistics in MongoDB, right? Well here is a working version. This script basically records the basic statistics on videos. So this time I am going to skip why and how I made my document structure and just show you my document structure: This may [...]
This fix is probably even simpler than the Apache one: Fix in Wiki As a further note I actually found out this doesn’t work so well and infact Cloudflare actually gives you the users IP by default now. You can run this PHP snippet to get the users cloudflare IP:
Just got a question on the MongoDB user group as which type of index over multiple fields would be best and why. The user basically had three fields: Type CompanyID Date And was wondering what the difference would be to using a compound index on all three fields and using a single key index per [...]
I fond out while using: That it actually returns incorrectly. It would keep returning an extra hour. I found this was due to DST. So I quickly put my thinking cap on and botched together this: This function will now correctly convert any timestamp into the needed date notation with fear of DST or other [...]
April 27, 2012 – 10:48 pm
Follow the link here: Cloudflare Wiki. It takes about 2 secs to install and works a treat.
There is now an example of this sort of aggregation here: Realtime Stats in MongoDB Example (PHP) As I troll the MongoDB user group (mongodb-user) I notice a LOT of questions about realtime statisitics handling in Mongo. As I have repeated myself about 100 times over I will write a blog post about it. Many [...]
February 10, 2012 – 3:04 pm
The abstraction php itself: The file uses a config like: And can be used like:
January 19, 2012 – 6:17 pm
I got this error today after an upgrade and google searched a lot. Turns out some one had encountered this error and had got the perfect fix: Nemethge’s Blog I am not sure exactly why this works but it seems like just symlinking your /var/run with your /run seems to do the trick. Anyway you [...]
January 16, 2012 – 9:05 pm
http://askubuntu.com/questions/96022/update-manager-cannot-find-repos-when-upgrading-to-oneiric/96028#96028 For those two Hash Sum mismatch errors: Remove the files in /var/lib/apt/lists/partial/ and try to update again.