After years of learning from forums and newsgroups, it’s time to give back.
Here are various bits and pieces of code that have made my work a bit easier.
You can see some of these widgets in action on sites built by my little web shop: Dialect.
Feel free to get in touch: e-mail code at dunae dot ca.
— Alex
Updates to plugins, gems and other code will be announced at twitter.com/TheCHANGELOG.
You can also subscribe to the Atom feed.
Rails plugins
Misc
Premailer
A script to make all external CSS inline—designed to improve the rendering of HTML e-mail.
Classy wp_list_pages WordPress Plugin
Adds a uniqe class or ID attribute to each LI tag generated by wp_list_pages() allowing them to be individually styled with CSS.
Campaign Monitor “Subscribe” Web Hook for Shopify
Subscribe a purchaser to a Campaign Monitor list using this Shopify web hook.
Proper Name Case Excel VBA Function
Apply proper capitalization to surnames/family names/last names in Excel with this VBA function.
Ruby Holidays Gem
The Ruby Holidays Gem allows you to look up holidays in multiple regions based on customizable definition lists.
W3C Validators Ruby Gem
W3C Validators is a Ruby wrapper for the World Wide Web Consortium’s online validation services. It supports the markup validator, the feed validator and the CSS validator.
Export SVN repositories as ZIP files
Allow downloads of SVN repositories as a zipped archive (as seen on this site)
Ruby CSS Parser Gem
A quick and dirty CSS parser. Check out the project page and the generated RDocs.
Web toolkit
A collection of Apache optimizations, short cuts and utilities that find their way into most of my projects.
Amazon S3 Rails-free rake
This is a modified version of S3 Rake by Adam Greene.
The main difference is that this script runs without any reference to a Rails application. It can still be used for Rails, but works just as well with PHP sites, static sites, etc…
Also, this version does not back up any code repositories. Sweet, simple, light.
svn co http://code.dunae.ca/s3rfr
Browse the source or download the zip file.
Discus forum extractor
A Ruby script to parse the flat files generated by the Discus Freeware forum into CSV format.
Installation
svn co http://code.dunae.ca/discus_extract
Compiling and running GeoIP databases on Dreamhost
Figuring this out took way to long. For your reference and mine, see this guide to compiling and running your own GeoIP databases on Dreamhost.
HTML and CSS experiments
Clipable columns
If the text within a container is taller than the specified height, the text is “clipped” to that height.
Multi-column, slide down
A three column box that slides up and down.
Resizable header with gallery
Header image resizes based on browser width; header image has caption and can be changed by user.