Skip to content

Best CSS Compression Around: CSS Optimizer 1.1

After almost four years I’ve released the next – and possibly the last for a very long while – version of CSS Optimizer. Aside from minor optimizations, I’ve fixed the last remaining parser bug having to do with “font: 62.5%/1.2em”. I haven’t yet updated the GUI application, but the command line application for linux and os x is updated. I’ve also fixed all issues with the online web css optimizer. Also a little while ago I added a css optimizer web service to allow easier integration to custom automation systems. I’ve tested CSS Optimizer against some of the newer CSS optimizers such as YUI compressor as well as other online compressors and CSS Optimizer has always come out on top…

Continue Reading

Interactive PHP Shell

PHP is an amazing language, I’ve appreciated it and its community more and more since I’ve been forced to mull through some ASP code. One thing it lacks in comparison to other languages such as BASH, Python, or Ruby is an interactive shell to test code in. A while back I found a nice little command line script that creates a quasi PHP shell. It isn’t perfect but it works pretty darn well for simple code testing and makes developing PHP scripts a bit easier. In addition to the command line shell a couple days ago a simple GUI PHP console, PHP console, was released. It seems to work fairly well, although I prefer the command line shell.

Continue Reading

Installing Custom PHP5 In Leopard

Lots of improvements have been made in Leopard, but the built in installation of PHP still lacks some essential packages and extensions (PDO, GD, etc). You could download MAMP or Marc’s package but either of those isn’t exactly a drop in replacement for the built in PHP installation – I’d rather not have two separate PHP installations floating around on my computer. Below is a script to compile PHP as a drop in replacement. I didn’t come up with this completely on my own, these two sources were a great help. You’ll need to make sure you have MacPorts installed in order for the installation of additional modules using the script below to work…

Continue Reading

CSS Compression Web Service

I’ve been making more use of my css optimizer in my recent web projects and put some work into creating an automated compression system for css and javascript files in a web project. In an effort to release a script that automates the compression of css and javascript files without compromising the ease of development and debugging I’ve setup a css optimizer service allowing you to use css optimizer without using the web interface or downloading the command line application. Here is how to access this service through the curl command line application: [code lang=”bash”] # compression on local css file curl http://mabblog.com/cssoptimizer/service.php -F “data=

Continue Reading

STM Evolution Laptop Backpack

About a year ago I was able to get a MacBook Pro at an incredible low price. I’ve had many of my friends break their laptop screens simply by walking from one location to another because of inadequate padding and protection and I didn’t want my laptop to suffer a similar fate. Putting the laptop in a incase sleeve wasn’t going to do it for me, and I didn’t want to lug around a ‘laptop bag’; I wanted a backpack specially designed for laptops. Luckily, to my surprise, I found exactly what I was looking for – the STM Evolution. The price on the bag was a little steep: $110. But thats a small price to pay for a easy to carry backpack that provides adequate padding. For the first couple months the bag worked great…

Continue Reading

Fix MacBook Pro Optical Drive Problems

Yesterday I was greatly distraught when my MacBook Pro’s superdrive would not accept blank DVD-Rs. When I inserted a blank DVD-R it spun around for a bit, sped up, slowed down, stopped, then spit it back out at me with no error message. It read DVDs, burned CDs, and read CDs fine; but I could not get it to accept a blank DVD-R! I searched around and found information about the MacBook superdrive update which killed alot of people’s optical drives. I couldn’t remember if i installed the update or not, so I was fairly worried because I did not want to drop $400 to fix something which an Apple update broke. I tried a bunch of tricks to try to get my beloved superdrive to work, but to no avail…

Continue Reading

TextMate: Local CSS Validation

Although TextMate comes with a built in CSS validation command it would sometimes fail for me depending on where I was working from (some locations have proxy software on the main router). I rewrote the command in the style of the PHP-HTML validator I posted earlier. You can add more validation options using -F. I’ve only used this script on CSS only files, it might not work on inline CSS in HTML documents. [code lang=”bash”]#!/usr/bin/env ruby -wKU scope = STDIN.read scope.gsub!(/< /?style.*?>/, ”) open(‘|curl -sF file=@-;type=text/css -F lang=en http://jigsaw.w3.org/css-validator/validator’, ‘r+’) do |io| io < < scope io.close_write while io.gets $_.gsub!(//, '&') print $_ end end [/code]

Continue Reading

TextMate: W3C HTML Validation For Local PHP Files

It is impossible to validate local PHP files via the built in W3C validation that the TextMate HTML bundle provides because it does not parse the PHP code in the PHP document. I’ve modified the default validation script to retrieve the file using OS X’s built in apache server (the script assumes you have your files in the ~/Sites directory) so it will work for not only PHP, but any apache-interpreted language. I’ve added the ss option to the W3C validator, you can add/remove any validation options to the curl command as you see fit…

Continue Reading