I have a PostNuke installation over at iglu.org.il, which receives many story submissions that contain nothing but spam. In order to help me get rid of all of them, I wrote a WWW-Mechanize script that deletes the submitted stories/articles from the queue one by one. However, it took it a long time to even delete one article, even when running on the localhost.
After looking at the PostNuke code, I realised that the table "pn_queue" (where "pn_" is the prefix of your PostNuke tables) contain these articles. So I tried running "DELETE FROM pn_queue" in the MySQL shell, and it indeed worked and pruned my queue. If you're interested in filtering only selected articles, you can use an SQL WHERE clause. This statement finishes in a shorter time than it takes my WWW-Mechanize script to delete one article.
That put aside, I'm looking for a better way to prevent spam from being submitted to the PostNuke queue in the first place.
On a slightly different note, I'd like to add that one should not copy binary executables that were compiled on a Mandriva Cooker system to a Debian Sarge system, because they are incompatible. I may have lost some of mail completely for several hours, because I did that with QClam, which caused it to segfault with a strange error.
- Location:Home
- Mood:
energetic - Music:Evanescence - My Immortal
Vim supports the concept of buffers, which are basically separate files that you can edit simultaneously in the same editor instance. I normally used the commands :bn (next buffer), :bp (previous buffer) and :bd (delete buffer), but I discovered other useful ones a few days ago.
One can display a list of buffers using the :buffers command, which can also be abbreviated as :ls. Besides each buffer is a number. One can then use the :b $NUMBER command to switch to that buffer. Note that if you're using gvim then the Buffers drop-down menu (Alt+B) will display a list of buffers with their numbers and will allow you to select a buffer to switch.
I'm off to a friend's wedding. Happy vimming!
- Location:Home
- Mood:
excited - Music:Shania Twain - Up!
