Backyard Rollercoaster made of PVC! With a 12 ft drop - YouTube

March 19, 2013 · 0 min · 0 words · shelby

A day in "court"...

Yesterday, I finally had my “court” date for the traffic violations back in March.  I got pulled over on the way back to work from lunch and got a ticket for Expired Registration and an incorrect address on my License.

July 8, 2011 · 2 min · 250 words · shelby

APC on a WHM/CPanel Server

One of my clients needed APC installed for their application, so I initially tried to install it via WHM module installer …. this failed. Here are the steps that I took to get it working via CLI{{ double-space-with-newline }}First download the newest stable release of APC and then run the following commands. wget http://pecl.php.net/get/APC-3.1.6.tgz{{ double-space-with-newline }}tar -xzf APC-3.1.6.tgz{{ double-space-with-newline }}cd APC-3.1.6{{ double-space-with-newline }}which php{{ double-space-with-newline }}phpize If you do not have pcre installed the make install will fail. So make sure to run the following yum command to install it with the development packages for safe measure.

February 21, 2011 · 2 min · 234 words · shelby

📈 Adding users from a CSV file to a MySQL database

I recently encountered an issue requiring me to import about 500 employees into a database and add each one to multiple departments. Using an array, I wrote some pretty simple code to import a CSV file that simply contained “username, real name” into the database. I wanted to post it in case anyone ever needed to do something along these lines. <?php include('../config.php'); $departments = array("department1", "department2", "department3", "department4"); mysql_connect("$dbhost", "$dbuser", "$dbpass") or die(mysql_error()); mysql_select_db("$dbase") or die(mysql_error()); $handle = fopen("employees.csv", "r"); while (($data = fgetcsv($handle, 5000, ",")) !== FALSE) { foreach ($departments as &$value) { $query = "INSERT INTO employees (`id`, `name`, `realname`, `tickets`, `dept`) VALUES (NULL, '$data[0]', '$data[1]', '0', '$value')"; $result = mysql_query($query) or die(mysql_error()); echo $data[1] . ' successfully added to ' . $value . ' department<br>'; } } unset($value); ?>

April 27, 2010 · 1 min · 133 words · shelby

Raid Solution

I am in search of a raid solution. I have been pretty interested in the Drobo but due to the cost of what you get I am not sure its the best method, though the idea is cool. I am thinking instead of maybe getting a few 1tb+ drives and a cheap RAID card and tossing it all into my Linux box as it would provide a lot more than just a storage device, not to mention the cost would be much less.

January 19, 2010 · 1 min · 83 words · shelby