Creating & Testing a Responsive Design Has Never Been Easier

Got my hands on these two marvellous responsive design tools from Adobe - Edge Reflow and Edge Inspect. Although Reflow is still in Beta, it has brilliant concept. Never the less it has a potential to redefine the way of how we create and test responsive designs once and for all. A much more effective way. It actually allows you to visualise everything blazing fast by adding different break points and adjusting the layout and design for each of them. Read On →

Add a Backorder Message on Magento's Product Page

Magento’s use of backorders does notify the customer, but only once you actually reach the basket page, which can lead to disappointment and frustration from the customer. The better answer is to display this on the product page, in place of the “In Stock” message. To acheive this, we just need to amend (read: override) the templates at app/design/frontend/base/default/template/catalog/product/view/type/simple.phtml app/design/frontend/base/default/template/catalog/product/view/type/grouped.phtml app/design/frontend/base/default/template/catalog/product/view/type/configurable.phtml And amend it to look like this: <?php $_product Read On →

Disable JavaScript alerts for a page

If you encounter a webpage that is generating a lot of alerts, the following bookmark will prevent them from stealing focus but still allow you to see what is being said. javascript:alert = function ( text ) { console.log( text ); return true; };

PHPStorm Regex Convert Array to Object Syntax

If you are converting some code from using array syntax to object property syntax then you might like this little snippet of regex. This is design to paste straight into the find/replace dialogue in PHPStorm Find: \$(\w+)\['([^']+)'\] Replace: \\\$$1->$2 And that is it

MySQL Substring not Returning Anything + Solution

If you are puzzled why your simple usage of the MySQL SUBSTRING() function is not returning anything this could be your solution. The substring function allows you to specify a string (eg a column), the start character and the length. If you are used to languages like PHP then you are probably used to this kind of function regarding 0 as the starting character. In fact this function regards 1 as the starting character. Read On →

Compiling Twitter Bootstrap's less files on Ubuntu 12.04/Mint 13

The version of lessc available in Ubuntu 12.04’s repositories is now out of date, stuck on version 1.2. When attempting to compile the bootstrap.less file to a proper CSS file, you’ll find it complaining with the following error: NameError: #grid > .core is undefined in /path/to/folder/less/bootstrap.less This is due to your lessc version being outdated, but with Ubuntu 12.04/Mint 13, lessc 1.3+ isn’t available in the repositories. You’ll also have issues because nodejs itself is outdated too. Read On →