My color scheme

November 4th, 2014 | Permalink

There are plenty of PHPStorm color schemes.. so this one is mine. I just took the darcula theme and modified the colors to add some contrast. Then over year of work or so I have modified it slightly every time i didn’t like something. And here’s the result: theme I got used to and am comfortable with. Place it in ~/.WebIdeX/config/colors


Download: Kewt.icls (~50kb)

LESS Loops

August 19th, 2014 | Permalink

Ok, LESS CSS rocks. I mean, I really-really love it. Tho, LESS does not have built-in loops, unlike SASS.

But that is, actually, not a big concern, since with less the function can call itself. And using it and LESS’s ability to pass LESS code as a parameter, an ability of mixin to call itself and it’s so-called “guard” we can actually create a mixin for a loop, using recursion (More LESS)

Dealing with touchscreen devices

March 22nd, 2014 | Permalink

Sometimes the website has elements which are not meant to be used with touch devices. Imagine we need to hide such elements. Ok, so there are numerous ways and recommendations to do so. One of which was using modernizr, for example, which is an awesome tool to check capabilities of the browser or, the another great thing, the 51degrees. There’s no big deal after all, but 5 lines of code is always better than 15kb of code…


Leading symbols (getting indent)

December 30th, 2013 | Permalink

Ok, so I needed to count a number of leading tabs. So I wrote this cute function which counts the number of leading symbols:

function callb($r){return intval(strlen($r[0])-strlen($r[1]));}
function getIndent($str){
    return $r==$str?0:$r;

Looks like it works without cycles. But.. To be honest this one should work way faster:

function getIndent($str){
    return $number;

But we love to look cool with our cool code, dont’t we?


December 17th, 2013 | Permalink

Sometimes I am getting curious with PHP. In such moments I reinvent wheels and create weird things. This thing is one of those weird things (more…)