locate is a lightning-fast command line search utility. It first hit the press in the early 80s when James A. Woods proclaimed the tradeoff of nightly updates is worth it for sub-second filesystem path matches.
The proposed architecture is simple but effective: incrementally encode all paths in a purpose-built binary database and perform matches with linear search. Since nearly all matches are partial, linear search generally outperforms binary search or other optimizations. Maintainers have followed this original architecture to the present day.
The indexer is called updatedb and it generally runs nightly, as root. If you have an encrypted home partition (and you should) nothing in your $HOME will be indexed. One workaround is to index it yourself. To maintain security I recommend storing the index inside your $HOME.
I like to use anacron since it automatically performs a catch-up run if necessary. This is handy for “daily would be nice” jobs that don’t need to run at an exact hour/minute of the day.
Here’s how to do it.
Add this to your crontab (this is one long line). This fires off your own personal anacron:
no matter how much ram you have, swap can increase performance by allowing unused anonymous memory to be paged out, thereby increasing your maximum effective RAM
Found via this post on Hacker News, where the poster raises the point that some filesystem buffers might be extremely “hot” (frequently used), but might only fit in physical RAM (where they should be) if some swap space is available to page out other “cold” information.
I run “web tests” on a remote server. I use Selenium to act like a person interacting with a website, viewing and entering data. Selenium is pretty awesome, it can drive a real web browser like Firefox.
Even better is to have these web tests run automatically every time I commit code. I use Jenkins for this. Jenkins even fires up a headless desktop so Selenium can run Firefox.
When a web test breaks (especially in some way I can’t reproduce on my local desktop), sometimes it helps to actually see what Jenkins sees as it runs the test. Here’s a quick guide for doing so on an Ubuntu GNU/Linux server.
Connect to the remote server using SSH. Install VNC server:
sudoapt-get install vnc4-server
sudo apt-get install vnc4-server
On the remote server, become the user tests run as. For example:
sudosu - ci
sudo su - ci
Set a password for the VNC server using the vncpasswd command.
Start headless X server by running vncserver. Note the given display. If example.com:1 is included in the output of vncserver, the display is :1.
Figure out which port the VNC server is using. I usually do something like
Based on this review I bought a Logitech QuickCam Pro 9000. I ignored all the red tape and “Run The Installer First!” warnings on the packaging, and plugged it in to my Ubuntu 8.04 laptop. And it worked immediately. Yay! Skype, Cheese, both work. Video sharing via Flash (like for Dimdim) doesn’t work, so no extra credit, yet. :)