If you’re using Mongoose, you’ve changed your indexes, and you’re wondering why you’ve run out of RAM, go into the Mongo shell and manually drop any indexes you are no longer using. Mongoose has no method for deleting indexes you’re not using any more, so they accumulate, gobbling up RAM. Now that you’ve cleaned out… Continue reading Mongoose Indexes and RAM Usage
Via Stack Overflow. And, of course, git add the empty directory. So helpful.
I have a Node.js program running as a daemon on a Linux VPS. Periodically, it polls a list of URLs using request. When it first starts, everything runs smoothly. But after running for a while, it starts getting 400 errors, and the longer it runs, the more URLs return 400 errors. I could not understand… Continue reading A Gotcha Using Node.js + Request In a Daemon
A couple of fun things I’ve been working on to learn some new programming skills, namely node.js and MongoDB. 1. News Bit — Remember Share Your OPML? Me too! 2. Linkblog — A super easy linkblog tool. I plan to open source the linkblog code soon. It also uses a shorturl tool I’m working on… Continue reading Current Projects
Some time ago, I answered another user’s question on Stack Overflow about database design for a multi-user feed aggregator. I also received an email from a developer asking for additional input, which I shared. But I thought I should put my response here, as well, for posterity’s sake if nothing else. Note that my comments… Continue reading Notes On Creating A Multi-user Feed Aggregator
Stop 0x00000024 Oy. Grab Windows XP Installation CD. Boot into Recovery Console dir c: // cannot read directory. chkdsk c: /p // 1 errors found Reboot into Recovery Console dir c: // success! fixboot Reboot into Windows // success Woot!
I wrote this script some time ago. It’s been working flawlessly for me, so I thought I’d share it here. It could use some progress messages, I suppose. #!/bin/bash DIR= # Put the file system path to your WordPress installation here. E.g., /var/www/html/blog TMPDIR=$HOME/tmp WPDIR=$TMPDIR/wordpress cd $TMPDIR rm -rf latest.zip ./wordpress # Clean up from… Continue reading WordPress Update Bash Script
In case I need to remember that I did this… By default, the Mac Terminal assigns the “Clear Scrollback” command to Command-K. This is annoying, because I often use Nano, which uses Control-K to cut a line of text, and I frequently press Command-K instead of Control-K by accident. This clears my screen while I’m… Continue reading Remap Mac Terminal Command-K