I recently upgraded my VPS to use Nginx and Virtualmin and found it to be a killer setup. Nginx is superfast in a low memory setup and Virtualmin GPL edition is a powerful and free control panel which I have found to be more intuitive than Cpanel. This guide will walk through what is required to setup a VPS with Debian, Nginx and Virtualmin.
How to style input tag file uploads in Webkit (Chrome, Safari)
If you’ve ever been tasked with creating a consistent user experience across all web browsers you’ve probably had a real challenge styling form input elements. Historically IE has been the most challenging to style but with file input elements webkit is almost impossible to change it from the default “choose file” dialog. Typically the file input is styled by setting it’s opacity to 0 and absolute positing it over an image of a browse button with whatever style is desired. The downside of this is that is requires JavaScript to update a text input element after a file is chosen with the file selection dialog. This technique uses pure CSS to present a consistent interface to all major browsers with a few vendor CSS prefixes.
Continue reading How to style input tag file uploads in Webkit (Chrome, Safari)
IE9 image load event bug
I just found a problem with IE9 in how it handles the load event for img tags. With IE8 and earlier if I wanted to perform some JS function after an image loaded I could do something like this:
Use webp images with jpeg fallback
Behold the Power of WebP
If the below image has “webp” in the corner your browser can display WebP. If it has “jpeg” it is because your browser cannot show WebP images but the user experience remains the same. webp is a new image format pioneered by Google based on the VP8 video codec to reduce the download size of images on the web. What I am presenting is a way to offer WebP images to browsers that support them while falling back to jpegs so that visitors still have the same user experience.
Install X11 on OS X 10.4 Tiger Without the Install DVD
I’m always surprised how hard it is to install standard open source packages on OS X and X11 is no different. Installing it on 10.4 is virtually impossible without the original installation DVD which I never have handy. I got this from James Martin but thought it needed an extra mirror because it was painfully slow downloading it from there. Here it is for your convenience.
Continue reading Install X11 on OS X 10.4 Tiger Without the Install DVD
Eshop Authorize.net AIM Integration
Eshop is a nice ecommerce plugin for WordPress but it does not support taking credit card information directly on the site but redirects the customer to Authorize.net site or Paypal or some other online payment processing. I had a need to accept cards without redirecting the customer to a external site so I wrote a patch for Eshop. Download patch here
UPDATE: Eshop Plugin has been discontinued. I recommend WooCommerce Instead.
Superfast embedded fonts with @font-face
Now that font embedding is supported in all major browsers it has become increasingly common thanks to the bulletproof embedding technique for programmers. However embedded fonts can add several milliseconds if not whole seconds and can even block rendering if not done correctly. Here you will find how to mitigate the performance implications if not eliminate them completely.
Bulletproof and fast css gradients
I am daring to claim that I have found the best bulletproof way to create css3 background gradients. It is the best because it guarantees that extra http requests are not made unless needed and bulletproof because it works in every browser falling back to a normal background-image based gradient if necessary.
UPDATE: Added new rules for IE10 and Opera 11.10!
Continue reading Bulletproof and fast css gradients
A free content delivery network for your domain
There are many things that make a webpage load quickly and the most difficult of which is serving static content from a content delivery network or CDN. There are two free CDN that I know of. Continue reading A free content delivery network for your domain
Run OS X in Linux with qemu
It is possible without too much difficulty to get OS X Leopard running as a guest in a virtual machine with Linux as the host without too much difficulty. It is illegal as far as I know unless you have Linux running on real Apple hardware and don’t want to reboot just to use OS X but if you’re in this boat you can also use Virtual Box which officially supports OSX guests on Apple hardware. If you don’t have Apple hardware you’re only option is qemu and now it’s possible with having to manually patch qemu.
Continue reading Run OS X in Linux with qemu