JSON Parsing Function for Shell Scripts

When testing REST-based web services that return JSON you may decide to use a shell script with cURL commands. Some services require a call to authorize a client and a second call to perform some action. In these cases, you would need to store the returned information in variables to use in subsequent calls. This is only a simple example of why you would want a shell script to parse JSON and return a value, but the usefulness of a JSON parser goes beyond a simple example like this. read more

Responsive 2-column layouts with CSS3

Using divs in web development is standard practice these days, but sometimes divs can’t do what tables used to do. Tables could easily create a 2-column layout where both columns had equal heights but a table couldn’t create a single-column layout when the window size changed. Divs work great for flowing layouts and responsive designs but their height property can be troublesome when a div is floated. read more

A simple c++ string replace function

I’ve been privileged by higher-level language string functions, such as PHP’s easy to use str_replace function, that I’ve forgotten how performing such simple tasks in lower-level languages like C++ can be such a hassle. Aside from using some library (of which I’m not aware yet), here’s a simple string replace function which is similar to the PHP version. In this case the function will directly modify the original string, not return an instance of a new string. read more

Dynamically Modifying Input Elements on Click

Sometimes it’s necessary to modify an input form element when a user clicks on that element. In some cases, the form element can contain information regarding what information is appropriate, or what format is expected. The most common example is showing “mm/dd/yyyy” in a text-based date field and automatically removing that information when a user clicks on the field. read more

Best Soccer Equipment Technologies

The soccer equipment plays an integral role after back to back scandals in the world of soccer. The need to implement a stronger technology that supports the decisions by the referee that seems critical is important for better utopian gameplay. read more

Switch vs If – Which is faster?

In programming there are two different methods that people use to test variables that have a number of different values. One method is to use the If statement and define blocks of code to perform. The other common method is to use a switch statement and list all possible values, perhaps including a default value, and perform some process inside the appropriate section of code. read more

Javascript: Flattening a Multidimensional Array

A friend had asked me about converting a 2-dimensional array into a flat 1-dimensional array. In array form this would be (written as was provided to me): read more

Raspberry Pi now available!

The Raspberry Pi is a computer, it’s a platform for development, it’s an educational tool that’s cheap enough for students and schools, it’s a media center PC, it’s a server, and it can be a robot brain. read more

Glasir – an open source PHP/HTML5 media player

Glasir is an open source PHP/HTML5 media player for a personal music collection of unlimited size. For use with Chrome, Firefox, and Android phones. It’s a project that I developed and open sourced for people to install it on their personal web servers and point it at a music folder. read more

Saving a Failing Hard Drive with GNU/Linux

I came to find out that my mother’s computer’s hard drive was failing. Programs took a long time to open and the computer would suddenly reboot for no reason. I discovered that the hard drive had bad sectors, which means potentially lost data if it decided to quit before I could save the data onto a different drive. Various GNU/Linux-based systems saved the day. read more

Making DVDs from JVC Everio MOD files using Ubuntu, WinFF, Avidemux, and DeVeDe

I purchased the JVC Everio hard disk camcorder with the intention of quickly copying the movie files from it and burning them to a DVD. Since I use Ubuntu and since the camera automatically detected as a USB hard drive, I did not install the supplied software, opting for open source applications instead. read more

Uploading Logitech Alert Security Video to Dropbox using PHP

Some time ago my house was broken into. My wife had left for a quick walk at a nearby park with our dog and within 30 minutes, at 10:30 in the morning, some people broke through our side-entry garage door and stole anything electronic that they could carry, as well as loaded weapons in a small safe. When my wife came home they escaped out the garage door again, leaving the house a mess. After this incident we decided to get some security cameras. read more

Latest Posts