How to Help Eliminate Spam with SPF Records


I really hate spam.  I’m sure just about everyone does.  I really hate it though when spammers forge my own email address as the sender, then I mark it as spam, then I inadvertantly end up having legit emails dumping into my spam box!  Ouch, talked about a breakdown in communication.

Searching for a string in a gz compressed file


Gzip is a compression technology available on most unix/linux systems.  Once in a while you might see a file such as filename.gz or filename.tar.gz and you may need to search through that file… I know some popular web server programs, such as apache, compress old log files to save space…

If you need to search through a .gz file, just use the zcat command (similar to cat):

zcat file.gz

GET and POST variables using PHP, the lazy way

If you want to catch form variables in $<variable name> format instead of the $_GET['variable name'] or $_POST['variable name'] format, just call import_request_variables() at the start of your script and supply either a ‘p’ or a ‘g’ argument for post or get respectively.  Kind of nice for those lazy programmer out there.

Search and Replace using the vi Editor


 If you’re like me then you’re using the unix vi editor like an oxygen tank on mars. But seriously, I’ve always liked the search and replace feature from other graphical based text editors so it’s only fair that we learn how to use vi’s search and replace function. It’s extremely useful and easy once you get the hang of it.


Syndicate content