Category Archives: Programming

Understanding Singletons

Why ANOTHER article about Singletons? If you search for ‘Singleton’ in Google or StackOverflow you get a bajillion and a half results.  That makes sense, because it’s one of the most commonly implemented design patterns in the history of software.  Some reasons for the popularity of the Singleton are: A.  It makes more intuitive sense [...]

Also posted in C++, JavaScript, PHP | Leave a comment

Add support for dbase in php 5.3.8

PHP’s dbase extension allows you to work with .dbf files in PHP. After php 5.2, you can no longer compile php with dbase support, so here’s how you can add it to your php installation: 1. Download dbase: http://pecl.php.net/get/dbase 2. Extract and cd into. 3. sudo phpize 4. sudo ./configure && sudo make && sudo [...]

Also posted in PHP | Leave a comment

Tackling the Linux Network for Small Business – Part 1 – Goals & Overview

I’ve been working on a Linux driven network for my family’s small business, Froedge Machine. It’s been an awesome, engrossing experience so far working on this – and the farther I delve the more I realize just how approachable this type of project is. I’m far along enough in the project now that I can [...]

Also posted in Networking | Leave a comment

PCI Compliance Step 5 – Adding Automated Virus Scanning to Your Ubuntu Server

Number 5 of the 12 PCI compliance steps in the SAQ D is to “Use and regularly update anti-virus software or programs.” We all know that this *really* isn’t needed – but it’s in the PCI compliance requirements – so here’s an easy way to do it. Install ClamAV: sudo apt-get install clamav And then [...]

Also posted in PCI Compliance | 2 Comments

Getting HMVC to play nicely with deeply nested config files in Sparks

I was recently debugging an issue with Codeigniter Payments and HMVC. The issue was that config files were not being loaded if they were deeply nested – for example: config/payments/my_gateway.php The MX_Config path explodes the filepath provided on forward slashes, so if you do anything other than this->load->config(‘whatever’), the file you want won’t get loaded, [...]

Also posted in CodeIgniter, PHP | 2 Comments

Common PHP Compile Configuration Options

I’ve been compiling PHP from source lately. Some common baseline options I’m using: sudo ./configure –with-mysql –with-apxs2=/usr/sbin/apxs –with-mcrypt=/usr/local/src/php-5.3.8/ext/mcrypt –with-config-file-path=/etc –with-openssl In my local dev environment, I place all my language source files in /usr/local/src (ie php 5.3.8) and then symlink any needed command line features. For example /bin/php would symlink to /usr/local/src/sapi/cli. That way, If [...]

Also posted in PHP | Comments closed

FuelPHP Package for Working with Campaign Monitor API

Continuing my “Do it Yourself” exploratory programming trend, I took one look at the CampaignMonitor SDK today and decided I’d write my own. Their API is RESTful, well documented, and easy to work with, so why not? Here is the final product: https://github.com/calvinfroedge/FuelPHP—CampaignMonitor-API-Package What I like about this API wrapper is the simplicity, and specifying [...]

Also posted in FuelPHP, PHP | 5 Comments

Setup Notification Emails When Git Repository is Updated (Ubuntu 10.10)

One of my colleagues suggested that we set up email notifications so that we could know when git repositories got updated. We ended up using git-commit-notifier with gmail. It worked like a charm and took about 30 mins to get setup. First, you need ruby installed (even if you have it, make sure you’re using [...]

Also posted in Version Control | Leave a comment

Frameworks and Knowledge Workers

What is a Framework? Essentially, it’s a buzzword to describe a packaged approach to completing work. It’s a way of building things, using strategically agreed upon components. The people who determine the components the framework will utilize can begin as one or a few original architects, and can morph into something that seems to have [...]

Also posted in Abstract, Frameworks | Leave a comment

Making Requests to XML API via Curl

I’m working on a UPS shipping class and wanted to get a feel for the UPS API before I started writing any code.  I decided to use cURL to to test.  Anyways, here’s how you format a request to an XML API via Curl / command line (Specifically, the UPS Address Validation API): curl -v [...]

Also posted in XML, cURL | 2 Comments