Recently I noticed a few sites had a page download instead of displaying when they were working perfectly fine before. I'm not 100% sure why but in my case the fix was to go into Virtualmin and toggle the PHP Version to some other version and back to my current one. I...
Bash Script for Installing / Updating Java JDK RPM
Here's a BASH script I wrote which downloads and installs the Java JDK RPM. Tested on CentOS 6.x. If you are looking to install on Ubuntu (or Mint) go here. It also downloads the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files which are...
How to grep a $_REQUEST, $_GET or $_POST variable in all files recursively
Have you ever wanted to do a grep search on all files for a variable such as $_REQUEST, $_GET or $_POST but couldn't figure it out? I have tried to do this a few times but end up just giving up because I don't usually figure it out. This time I wanted to jot down my...
Redirect Apache ServerAlias to ServerName
I had a website that was moved to a new domain name but I wanted to make all the old URLs redirect to the new domain. However, redirecting using a typical .htaccess redirect as shown below wouldn't work because it was new using the old domain as a ServerAlias to the...
Recursively find and replace php.ini date.timezone
I recently had to update PHP on a server and the php.ini settings but then the date.timezone wasn't set in a bunch of servers. So I decided just to search and replace them instead of doing them all individually. find . -name 'php.ini' -type f -exec sed -i...
Building mod_webpresence for ejabberd on CentOS
I keep forgetting how to setup the mod_webpresence for ejabberd whenever I happen to reinstall everything so I am typing it out here for future reference and maybe it'll even be useful for others. The instructions aren't 100% clear for me on the ejabberd-contrib...
Servers, Code, Websites, the Whole Internet
So many websites out there. They number in the billions. So many people trying to make their mark in the world wide web. Why start another website? Well I'm hoping to write about things I find useful, especially if I might want to reference it in the future, and...