This function takes year as a parameter and returns a list of Holiday dates for that year. It returns an array of key/value pairs.

Example that prints out all of the US Holidays in the year 2014.

Date posted: July 16, 2014 | Author: | No Comments »

Categories: Programming Web


Do you need to filter input fields in your form to prevent users from filling them in incorrectly. Use this simple Javascript function to filter user input and remove invalid characters depending on the filter type. I have used this function in a few projects and does not require jQuery. You can easily add additional filter types to the function. The below example can filter integers and floats.

You can use this function by with Javascript events or directly in your HTML.

You can also change the event to filter input other events like onchange or onblur.

Date posted: July 8, 2014 | Author: | No Comments »

Categories: Programming Web

Tags: , ,

Parse HTML With PHP
Not all websites have a easy to use API for looking up information, but you can parse HTML for almost every website to extract data. PHP can be used to parse the DOM (Document Object Model) of HTML pages and extract data. In PHP 5 the DOM extension was introduced that allows manipulation of the HTML/XML DOM.

Continue reading Parse HTML Using PHP – Web scraping made easy

Date posted: July 4, 2014 | Author: | No Comments »

Categories: Programming Uncategorized Web

Tags: ,

What is a SQL Injection?

SQL injection is a technique to attack database based applications. The attacker inserts SQL statements into an input field of the application for execution by the database. An application with a vulnerability can be used by an attacker to dump the contents of a database, delete the database contents, insert HTML code to perform Cross-site scripting (XSS) attack, and much more.

Continue reading Preventing SQL Injection in PHP

Date posted: June 21, 2014 | Author: | No Comments »

Categories: Programming Web

Tags: , ,

Are you have problems with automated SPAM bots submitting to your PHP form? This can easily be fixed by adding a CAPTCHA to your form. CAPTCHA stands for: Completely Automated Public Turing test to tell Computers and Humans Apart. The main purpose of a CAPTCHA is to distinguish human from a computer. A code or image is presented in a way that only a human would be able to understand, so say good bye to automated SPAM!

Continue reading Stop form spam by adding a CAPTCHA

Date posted: May 15, 2014 | Author: | No Comments »

Categories: Programming Web

Tags: , , , , , , ,

R. Lee Ermey's Official Soundboard Splash Screen
Gunnery Sergeant R. Lee Ermey’s official soundboard has over 60 sounds. All sound clips can be download and used for your ringtones. The app has a built in timer to have the Gunny scream at someone when they least expect it. Lots of clips from Full Metal Jacket and custom ringtones.

Download Gunnery Sergeant R. Lee Ermey's official soundboard on the Google Play Store


Continue reading R. Lee Ermey’s Official Soundboard

Date posted: October 16, 2011 | Author: | No Comments »

Categories: Android Apps JAVA

Tags: , ,

If your system abruptly loses power, or if a RAID card is beginning to fail, you might see an ominous message like this within your logs:

EXT3-fs error (device hda3) in start_transaction: Journal has aborted

Basically, the system is telling you that it’s detected a filesystem/journal mismatch, and it can’t utilize the journal any longer. When this situation pops up, the filesystem gets mounted read-only almost immediately. To fix the situation, you can remount the partition as ext2 (if it isn’t your active root partition), or you can commence the repair operations.

Continue reading Fixing EXT3 Aborted Journal

Date posted: August 24, 2010 | Author: | 2 Comments »

Categories: Linux

Tags: , ,

Very useful search and replace command for the linux command line. This command is made up of a find command to find the files that you want and a perl command to do the text replacement.

The first part “find . -type f -name “*.html” -print” finds all of the files starting at the current directory that end with .html. The “-type f” makes sure that only files are found and not directories. The string that comes after the -name parameter is the filename to find. The -print parameter just prints the
the relative path to the found file.

The -exec parameter is used to execute a command with the found file. Everything after the -exec is executed until it reaches “;”.

Continue reading Search and Replace Text in Files Recursively

Date posted: May 15, 2010 | Author: | No Comments »

Categories: Linux

Tags: ,

Copyright © 2013, Neil Bittner. All Rights Reserved.