Mike Shannon - Tips http://www.mikeshannon.com/taxonomy/term/5/0 en How to Help Eliminate Spam with SPF Records http://www.mikeshannon.com/how-to-help-eliminate-spam-with-spf-records <p>I really hate spam.&nbsp; I&rsquo;m sure just about everyone does.&nbsp; 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!&nbsp; Ouch, talked about a breakdown in communication.</p> <p><a href="http://www.mikeshannon.com/how-to-help-eliminate-spam-with-spf-records" target="_blank">read more</a></p> http://www.mikeshannon.com/how-to-help-eliminate-spam-with-spf-records#comments How To Tips Wed, 04 Mar 2009 19:10:05 +0000 admin 91 at http://www.mikeshannon.com Searching for a string in a gz compressed file http://www.mikeshannon.com/searching-for-string-in-gz-compressed-file <p>Gzip is a compression technology available on most unix/linux systems. &nbsp;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&hellip; I know some popular web server programs, such as&nbsp;<a href="http://httpd.apache.org/">apache</a>, compress old log files to save space&hellip;</p> <p>If you need to search through a .gz file, just use the zcat command (similar to cat):</p> <p>zcat file.gz</p> <p><a href="http://www.mikeshannon.com/searching-for-string-in-gz-compressed-file" target="_blank">read more</a></p> http://www.mikeshannon.com/searching-for-string-in-gz-compressed-file#comments How To Tips Wed, 11 Feb 2009 00:58:20 +0000 admin 89 at http://www.mikeshannon.com GET and POST variables using PHP, the lazy way http://www.mikeshannon.com/get-and-post-variables-using-php-lazy-way <p>If you want to catch form variables in $&lt;variable name&gt; format instead of the $_GET['variable name'] or $_POST['variable name'] format, just call&nbsp;<a href="http://us3.php.net/variables.external">import_request_variables</a>() at the start of your script and supply either a &lsquo;p&rsquo; or a &lsquo;g&rsquo; argument for post or get respectively.&nbsp; Kind of nice for those lazy programmer out there.</p> <p><a href="http://www.mikeshannon.com/get-and-post-variables-using-php-lazy-way" target="_blank">read more</a></p> http://www.mikeshannon.com/get-and-post-variables-using-php-lazy-way#comments Tips Web Development Thu, 23 Oct 2008 00:51:26 +0000 admin 85 at http://www.mikeshannon.com Search and Replace using the vi Editor http://www.mikeshannon.com/search-and-replace-using-vi-editor <p>&nbsp;If you&rsquo;re like me then you&rsquo;re using the unix vi editor like an oxygen tank on mars. But seriously, I&rsquo;ve always liked the search and replace feature from other graphical based text editors so it&rsquo;s only fair that we learn how to use vi&rsquo;s search and replace function. It&rsquo;s extremely useful and easy once you get the hang of it.</p> <p><span class="geshifilter"><code class="geshifilter-bash">:<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">/</span>old_string<span style="color: #000000; font-weight: bold;">/</span>new_string<span style="color: #000000; font-weight: bold;">/</span>g</code></span></p> <p><a href="http://www.mikeshannon.com/search-and-replace-using-vi-editor" target="_blank">read more</a></p> http://www.mikeshannon.com/search-and-replace-using-vi-editor#comments Linux Tips Thu, 06 Mar 2008 20:12:58 +0000 admin 74 at http://www.mikeshannon.com