Jul 29, 2013 ·
2 minute read
web design
As a designer who is keen on usability and user centric, well tested web systems I was in a desperate need of silly fast and useful mobile prototyping system. Up until recently I’ve used paper prototyping and later uploading images on various smart phones (always struggling with inaccurate representation of actual interface size, look and feel of the interactions). Thankfully, that is the past and the future holds much brighter and functional solution for rapid fast mobile prototyping thanks to Proto.io I see that they have been around for a while, which only brings lots of benefits to us – usability testers and designers.
Read On →
Jul 26, 2013 ·
1 minute read
css
It may some times be necessary to prevent a user from zooming in on a mobile browser. This can be done with the following meta tag <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' /> <meta name="viewport" content="width=device-width" />
Jul 26, 2013 ·
1 minute read
magentobash
If you are required to connect to different servers, then remembering and typing in all of the details can become tiresome. Thankfully there is simple solution to this, using the SSH config file. To make use of this, create the following file ~/.ssh/config In there add the following details Host easyToRememberName HostName 127.0.0.1 Port 2020 User ross You will then can tab completion on ssh and scp commands. You can
Read On →
Jul 25, 2013 ·
2 minute read
php
I had a scenario where an API I was working with would sometimes base64 encode data (instead of using CDATA which is the more usual approach). However to really make things interesting, they didn’t always do this so you couldn’t just go and decode everything. Here is the solution I came up with: First of all, take the raw response and run preg_replace_callback on it to grab all of the XML contents: preg_replace_callback('%>([^<]+?)<%', array($this, '_decode'), $response) Then the callback function is a method on the same object hence the use of array($this, ‘_decode’) /** * Decode from bas64 if it actually is base64 encoded in the first place * * If not return the raw string * * @param $matches * @return string */ protected function _decode($matches) { $raw=$matches[1]; $decoded = base64_decode($raw, true); $return=$decoded; if(false === $decoded){ $return=$raw; }elseif(base64_encode($decoded) != $raw){ $return=$raw; } return '><![CDATA[' .
Read On →
Jul 23, 2013 ·
2 minute read
magento
As if there weren’t enough! There is a new contender for the open source e-commerce crown, a platform called Sylius. The thing that makes this one especially interesting is that rather than being built from scratch it is based upon a very well established PHP framework called Symfony. Some would argue that Symfony is the “other” PHP framework alongside Zend Framework. In fact there are many frameworks however it would be fair to say that Symfony and Zend Framework are the most well established and up to date.
Read On →
Jul 9, 2013 ·
1 minute read
bash
I have recently discovered a handy trick when comparing files on the command line. Adding the -y command line options to diff will display the files side by side. Using this with the Color Diff tool will help you transform this To this