Category: General

  • Solid Basic Javascript Input Validation

    Here is a simple yet pretty powerful and easy to use way to do validation on HTML form text boxes and text areas and similar controls. It checks to make sure required form field have *something* in them before allowing processing to continue. It’s a good simple way to add some basic validation to prevent…

  • Execute a console command in PHP revised

    While it seems like there are multitude of different methods to execute commands in PHP, so far the code I will go over below is my preferred method. Using the passthru() function works nicely and includes the final return code of whatever was being executed, which is generally useful to me in error checking. In…

  • .NET Path.Combine() in PHP

    I’m the type of person who prefers to do things in a way that I perceive as the proper or correct way. While this tends to make things take a bit longer to accomplish, I feel the result ends up being better overall. One such thing I noticed is that file and path handling in…

  • Lucid Ubuntu and GDAL Latest

    I’m writing some software that relies on a feature of GDAL (Geospatial Data Abstraction Library) in a more recent version than the one Ubuntu Lucid currently has in their repository. As I write the software on my desktop, I found out pretty quickly that I was using an old version of one of the commands…

  • Speed up Netbeans in Ubuntu Linux

    Java Netbeans is a pretty decent editor for PHP code. I use Linux Ubuntu now for my primary desktop computer, so it’s quite convenient and easy to get running. One issue is that in default configuration the program is a bit slow feeling. Doing a quick search I found this page: http://performance.netbeans.org/howto/jvmswitches/ Which describes a…

  • .NET MONO Which Operating System is Running?

    Do you want to execute operating system specific code (exes) in the .NET/Mono framework? I’ll go over how you can do that. Below is part of a class I had written that can determine if Linux or Windows is running. Keep in mind that for the code to properly detect Mac OS, you will need…

  • WordPress Visual Editor CRLF Quirk

    Adding extra vertical space (eg. carriage return) to postings in WordPress can be a pain. While there might be a plugin to fix the issue, learned by searching around that using the code: When in HTML mode will not be deleted by the visual mode processor. So if you flip back and forth between the…

  • Securing a WordPress Blog

    Please view this newer article for another method of securing the wp-admin directory from access. Here are a few tips to securing a wordpress based blog or site: Change the location of your wp-content directory. This is good for making your site’s source code less discernable as a wordpress blog. In the wp-config.php file: Change…

  • Setting up a Source Control Server

    Lately, I’ve been interested in the benefits of having a dedicated source control server. My goals for the project: 1. Have a dedicated server to store source and other files I’m working on that could benefit from source control and a secondary backup. 2. Have the server accessible through the Internet so that friends who…