In the following article, I’m going to attempt to describe how one might bootstrap the technical components of their startup as cheaply as humanly possible, while still giving you room to easily scale. A lot of this is based on what I’ve learned in the last 2+ years as the CTO of massify.com, an online networking site for film makers. Your mileage may vary, of course, and I’m sure there are a variety of alternatives to some of the things I’ll be recommending. I welcome all commenters to pitch in with their own experiences in hopes that we can grow this post into a useful resource for up and coming entrepreneurs.
Continue reading Bootstrapping Technology For Eight Bucks a Day
The following guide will walk you through setting up possibly the fastest way to serve PHP known to man. If there is a faster way, I’ve not yet found it climbing through zillions of blog posts out there on the subject. In this article, we’ll be installing nginx http server, PHP with the PHP-FPM patches, as well as APC. The end result? Pure awesome.
Continue reading NGINX + PHP-FPM + APC = Awesome
UPDATED: Added support for expressions with variables so that you can add, multiply, divide, etc. variables when using them in the CSS. See below for more info.
Back in April of 2008, I came across a proposal by Daniel Glazman and David Hyatt for using variables in CSS stylesheets. I thought the proposal was absolutely brilliant, filling a much needed void for sites using complicated stylesheets across a variety of different pages. Another part of their proposal was being able to include/import other stylesheets. I don’t know anyone that couldn’t find this useful.
I put together a quick class for implementing most of their proposal using PHP. Nothing fancy going on here, most of it is some simple regexes.
Download the code here.
Continue reading Variables in CSS via PHP
There’s a ton of stuff I miss from C#, having moved to PHP. Did I say a ton? I meant a megaton.
One of the things I miss the most (besides the sanity) are attributes (annotations for Java peeps). To be able to ascribe metadata to class, method and property definitions opens up a whole new world of introspection which enables you to do some pretty wicked hacks.
In this post, I present a PHP class that allows you to do metadata/attribute programming with PHP. You can download the class here. But before we dig in, we must understand what attributes are and how they are useful…
Continue reading Metadata/Attributes in PHP