Posts tagged ‘LAMP’

Take That, Bandwidth Leeches

A recent trip through my hit reports revealed a startling fact: This site’s bandwidth is being heavily leeched.

Yes, I never thought it could happen to me, an innocent little development blog that posts an occasional hot babe. But then, it did happen; it seems many, many people like the image of the fat Denver Broncos cheerleader candidate, and have been hotlinking to it from many, many BBS.

So, I have struck my revenge with mod_rewrite. With a couple lines of code, you can pretty much shut down hotlinking of images and other resources, period:

Continue reading ‘Take That, Bandwidth Leeches’ »

Fixing A “Bad Minute” Error Message When Trying To Use Crontab With Certain Unix Text Editors

A helpful tidbit I ran across about using crontab and trying to edit it using the command crontab -e.

If your cron jobs do not appear as a single line in the crontab text file, you’ll get an error like this:

"/tmp/crontab.XXXXXX.crontab":1: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?

Crontab delimits jobs in its text file by using line breaks (newlines). Each job occupies one line. Therefore, if crontab sees anything other than an integer in the first column of a line, it throws the “bad minute” error, since the minute argument is the first one crontab encounters.

This problem most often occurs because you’re using a text editor, such as pico, that fakes word wrapping by adding a newline when it reaches a certain column position.

Continue reading ‘Fixing A “Bad Minute” Error Message When Trying To Use Crontab With Certain Unix Text Editors’ »