Skip to content

Pow, Apache, Rails, WordPress, and Yosemite

I work on both PHP (WordPress) and Rails sites. It’s important that it is easy to switch contexts and manage all of the different environments. I’m constantly tweaking my dotfiles to make things easier. I recently updated to Yosemite and ran into some issues getting Apache and Pow to play nicely along with each other. Here were my goals: Run rails apps through Pow. I want to be able to visit http://myapp.dev/ and spin up my rails app Visit WordPress sites on *.dev domains…

Continue Reading

NetSuite Global Search Shortcuts for Alfred.app

I’ve done a lot of NetSuite development in ruby over the last couple years. It’s very challenging to integrate NetSuite with external applications. During the process of completing several NetSuite integration projects I’ve developed a set of tools and shortcuts to speed up the NetSuite development workflow. One key tool is search shortcuts for Alfred.app.  I have a production and sandbox search shortcut which drops my search query directly in the NetSuite global search bar. This search shortcut allows me to just type in NetSuite customer number, sales order number etc and jump right to the record in the NetSuite environment. Many times if you go to the NetSuite homepage directly you are required to login again…

Continue Reading

JPEG + PNG Color Management Strategies for the Web

The first step in the design process of any website is to mockup the design in Photoshop. One of the most frustrating parts of the design process can be converting your mockup into image slices whose colors mix well with native CSS styles. Mark Edwards, over at Bjango, has a great writeup on color profile management and UI design. The basic tenants are: don’t color manage, use native monitor color profile, use RGB, and do not attach color profiles to JPG or PNG images. However, in my senario, I often work with graphics that have been designed by people who work in print and don’t understand web image generation in the slightest. Often I’ll receive unoptimized PNGs, JPGs in CMYK, images with color profiles, etc…

Continue Reading

eBay PHP Framework, Tumblr for Kohana, and More

I’ve been throwing a decent amount of code on GitHub + Gist recently; I wanted to highlight a couple of the projects that the community might find useful. eBay PHP Framework Wrapper There isn’t a ton of documentation or examples around the eBay PHP Accelerator toolkit. Actually, I think it has been a couple years since the framework itself has been updated. I’ve put together a small eBay PHP library with some generic posting and searching wrapper functions. The code was pulled out of an active project and still has some references to the context in which it was situated, but it should provide a good starting point to anyone looking to work with the eBay PHP framework…

Continue Reading

Dynamic AJAX Content, Internet Explorer, MooTools, and Form Elements

Another day, another Internet Explorer bug. I was using MooTool’s Request.HTML to load some AJAX content to display within an inline popup and IE kept throwing the classic “Object doesn’t support this property or method” error. The error was occurring inside document.id (i.e. the dollar function) which made the issue even stranger. Looking at the dollar function’s source code, it seems as though methods are copied from Element.prototype to the element being retrieved. The AJAX content I was loading contained a form which had a form element with ID “position”. When the Request.HTML receives html content it retrieves a list of all elements contained with the AJAX response using getElements(“*”)…

Continue Reading

Using VMWare + Windows to Test Web Sites on Windows

Step 1: Retrieve Emulator’s Gateway IP Address Grab the inet number resulting from `ifconfig vmnet1`. Step 2: Add Test Site’s Local Hostname to Window’s Host File For each site I develop I setup a new Apache virtual host (some info on apache virtual hosts here). For instance, the local domain / hostname for a website could be mabblog.localhost. When developing locally there are some hardlinks to the local development hostname, for this reason the it isn’t enough to use the inet vmnet1 address retrieved above when debugging in VMWare / Parallels; the local hostname must be added to the Windows host file…

Continue Reading

HTML For Email Newsletters & Image Links

Recently I’ve made some minor adjustments on newsletter bound HTML documents. One particular document was made in the iContact WYSIWYG editor and as you can expect the HTML markup was horrendous. Even worse than the markup was the various ways the email displayed in different email viewing environments. Hotmail, Outlook, and Gmail all displayed this same email differently. The main issue I was experiencing was a mysterious 3px bottom ‘padding’ given to all img elements wrapped in an anchor tag and lined up horizontally using tds (apparently tables are still the norm for email marketing). No actual CSS padding or margin was being applied to the img or any of its container elements…

Continue Reading

Compiling PHP 5.2.11 on OS X 10.5.8

I’ve detailed this problem before but yet again I’ve encountered the infamous iconv compile error. This bug is not new yet it still has not been fixed in the latest PHP release. When compiling a custom version of PHP with libraries such as libxml and iconv the make process results in a linking error relating to the iconv library. The problem arises because I have two versions of iconv installed – the macports version in addition to the standard installation. A linking conflict arises and to eliminate the error a linking search order change (which is detailed in my previous blog post) must be made…

Continue Reading

NetSuite PHPToolkit & Uncaught Empty Search Results Error

So far my experience with NetSuite has been less than favorable. Their developer resources aren’t bad, but they aren’t terribly good either. I’m working on a project that involves searching through contacts & selectively modifying contact data based on search results. In some cases the search will return an empty result set – just like any normal search should. I would have thought that the PHP developer kit was mature enough to handle an empty search set, but apparently not…

Continue Reading