Awnist

Creating color swatches with Imagemagick and bash

#!/bin/bash if [ ! -d colors ]; then mkdir colors fi for color in “$@” do convert -size 100×100 xc:$color colors/$color.jpg done Run with: ./colors.sh blue black green purple Add a hash # in front of $color to generate by hex.  

Overriding Magento’s form error mechanisms

Magento’s form error classes are pretty ugly and poorly designed. Luckily, it’s easy to override the methods located in prototype/validation.js. Let’s allow validation on hidden form elements and start working on better looking advice when errors occur. Object.extend(Validation, { isVisible : function(elm) { return true; }, insertAdvice : function(elm, advice){ // advice contains the div [...]