Share
Scroll down

My Latest Articles

Step into the mind of a long-time developer, long-time server manager, and full-time geek 🙂

Been awhile since I've posted anything... holy moly has it! So, as I am sure most of you are aware, I am a programmer/developer by heart and soul, so it was only a matter of time before I started (finally) getting into doing some tweaking for Android devices.  As a result, I have made up a set of "tweaks" for my Note 3 that have it running creamy smooth like buttah ;) It all started with my Galaxy S4 actually, but since i don't have that beast anymore, I did it for my Note 3. What does it do Kev? Vacuum's SQLite every 4 days Zip-Aligns all User Data APK's every 3 days (if you choose) Cleans Caches, Logs, Tombstones, etc... every week Tweaks Your…

Read more
01

Post revisions This is a weakness of WordPress. On this site there are over 30,000 revisions for the 14,000 posts. That makes the table bigger and it's slower to search in it. WordPress users realized this three years ago. Tip #1 We backed up the the wp_posts table and then used a simple MySQL command to remove old post revisions. This decreased the table size from 400MB to 120MB: DELETE FROM `wp_posts` WHERE post_type = 'revision' AND post_date NOT LIKE '2012-%' Long-term solution There are WordPress plugins which can limit the number of revisions per post. We think that the WordPress code should be improved and the revisions should be stored in a different table to maximize speed. You can support this on WordPress bug…

Read more
02

Need a good way to resize your uploaded image?   While keeping the height/width ratio? Why would you need to do this?  Well, like most of you, I did not need to keep full sized images that I upload on page, and needed a good way to create thumbnails, and resize the originals down to a more manageable, more web friendly size. This will do the trick...  no words of caution, no instructions, just code... use it how you like :) <?php function ResizeImage($inputFile, $filepath, $ext, $maxWidth, $maxHeight){ /* Get some details about the image */ $srcDetails = getimagesize($inputFile); switch ($srcDetails[2]) { case 1: //GIF $source_image = imagecreatefromgif($inputFile); break; case 2: //JPEG $source_image = imagecreatefromjpeg($inputFile); break; case 3: //PNG $source_image = imagecreatefrompng($inputFile); break; case 6: //WBMP…

Read more
03

I found myself needing a really simple way to pull in my sites menu, but also wanted the ability to have some placeholders for the links as well.  The following code should be created as a snippet, and called un-cached [[!YOUR_SNIPPET_NAME]] What's it do? Well, simply put it generates a navigation block, and throws all your ModX site page links into a hierarchal un-ordered list of link items.  As well, as generates a bunch of dynamic placeholders in case you have a need for them.  Note:  the snippet needs to be called, prior to placing any placeholders in your content. How Do I Use This? Create your template or page and place the following snippet call (make sure to replace YOUR_SNIPPET_NAME, with whatever you named…

Read more
04

UPDATE 2.0!!! Wow, just realized it's been awhile since i posted anything... well kiddies, time for some new code. Although I have grown up loveing, carressing, and mutilating Visual Basic, I have decided to take a stab at some C# since most of my projects lately have comes across in the form of PHP.  While I do love VB still, I am starting to fall hard for some C# sexyness (<- spelling). I have a VB version of what I am about to post as well, and though the language structure is different, there really aren't very many differences between the 2.  I thought I may get some sort of performance boost out of this "conversion" but alas, I was mistaken.  Both languages performed admirably…

Read more
05