<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I live in Ukraine, work in Petrosoft as front-end developer, love JS, CSS, performance</description><title>Alex Khomenko</title><generator>Tumblr (3.0; @okhomenko)</generator><link>http://alexkhomenko.com/</link><item><title>Vika Zhurbas: потому что жизнь без движения не имеет смысла потому что стоять на...</title><description>&lt;a href="http://www.vikazhurbas.com/post/22830577123"&gt;Vika Zhurbas: потому что жизнь без движения не имеет смысла потому что стоять на...&lt;/a&gt;: &lt;p&gt;&lt;a class="tumblr_blog" href="http://www.vikazhurbas.com/post/22830577123"&gt;vikazhurbas&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;потому что жизнь без движения не имеет смысла&lt;br/&gt; потому что стоять на месте нудно-скучно&lt;br/&gt; потому что бурление и кипение&lt;br/&gt; в организме эмоций это нужно&lt;br/&gt;&lt;br/&gt;потому что ломаются стихи&lt;br/&gt;когда теряешь мысль и рифму&lt;br/&gt;также ломается жизнь&lt;br/&gt;когда теряешь смысл&lt;/p&gt;
&lt;p&gt;&lt;em&gt;двадцать восьмое апреля одиннадцатого&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://alexkhomenko.com/post/22831326426</link><guid>http://alexkhomenko.com/post/22831326426</guid><pubDate>Fri, 11 May 2012 10:06:25 +0300</pubDate></item><item><title>Closures in CoffeeScript</title><description>&lt;p&gt;Closures in CoffeeScript are implementing very simple:&lt;/p&gt;

&lt;pre&gt;window.MusicBox =
    module: (-&amp;gt;
        modules = {}
        (name) -&amp;gt;
            if modules[name]
                modules[name]
            else
                modules[name] =
                    Views: {}
    )()
&lt;/pre&gt;


&lt;p&gt;&lt;a href="https://github.com/jashkenas/coffee-script/issues/43"&gt;https://github.com/jashkenas/coffee-script/issues/43&lt;/a&gt;&lt;/p&gt;</description><link>http://alexkhomenko.com/post/12705998312</link><guid>http://alexkhomenko.com/post/12705998312</guid><pubDate>Sun, 13 Nov 2011 00:08:00 +0200</pubDate></item><item><title>"Тот, кто уходит, становится тяжелее,
с каждым шагом делаясь все моложе,
с точки зрения того, кто..."</title><description>“Тот, кто уходит, становится тяжелее,&lt;br/&gt;
с каждым шагом делаясь все моложе,&lt;br/&gt;
с точки зрения того, кто стоит на месте.&lt;br/&gt;
Потому что, когда ты стоишь на месте,&lt;br/&gt;
время твое идет быстрее,&lt;br/&gt;
чем у того, кто уходит прочь. &lt;br/&gt;
И чем быстрее он удаляется от тебя,&lt;br/&gt;
тем меньше он изменяется для тебя,&lt;br/&gt;
хотя визуально ты его уже и не разглядишь,&lt;br/&gt;
потому что он становится все меньше и меньше.&lt;br/&gt;
Впрочем, скоро уже и вглядываться не имеет смысла,&lt;br/&gt;
поскольку сила притяжения ослабевает&lt;br/&gt;
обратно пропорционально расстоянию в квадрате&lt;br/&gt;
и, хотя и ощущается даже на краю вселенной,&lt;br/&gt;
там этим ощущением можно пренебречь&lt;br/&gt;
ввиду его бесконечной малости…”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;(via &lt;a href="http://iv-0lga.tumblr.com/"&gt;iv-0lga&lt;/a&gt;)&lt;/em&gt;</description><link>http://alexkhomenko.com/post/11317009482</link><guid>http://alexkhomenko.com/post/11317009482</guid><pubDate>Tue, 11 Oct 2011 17:51:02 +0300</pubDate></item><item><title>Save images in local storage as data URI</title><description>&lt;p&gt;Last time I created markup I saved decorative images in css as data URI. So all images arrived to client with css and client saw all design at once without need waiting for downloading decorative images.&lt;/p&gt;
&lt;p&gt;Now I&amp;#8217;m doing the backbone app and I save models in localStorage. So only images are not saved locally. And I&amp;#8217;ve got thought about saving non-decorative images in localStorage as data URI. I think it may have reason if you have not much pictures.&lt;/p&gt;
&lt;p&gt;Of course limitation is 5MB for all stuff. What do you think?&lt;/p&gt;</description><link>http://alexkhomenko.com/post/11275065863</link><guid>http://alexkhomenko.com/post/11275065863</guid><pubDate>Mon, 10 Oct 2011 18:43:00 +0300</pubDate><category>backbone javascript</category><category>localStorage</category><category>data URI</category></item><item><title>Remote debug php-application with xdebug</title><description>&lt;p&gt;I debug applications for a while with xdebug on local machine. I just set xdebug.remote_enable = 1 in php.ini and that&amp;#8217;s all.&lt;/p&gt;
&lt;p&gt;Tomorrow I have need to debug application on remote host and I couldn&amp;#8217;t do this. So after some investigation I&amp;#8217;ve found some solutions for remote debug:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Set xdebug.values in .htaccess: &lt;br/&gt;&lt;code&gt;php_value xdebug.remote_enable on&lt;br/&gt; php_value xdebug.remote_host 209.85.148.99&lt;/code&gt;&lt;/li&gt;
&lt;h2&gt;If you need setup debug env for multiple users:&lt;/h2&gt;
&lt;li&gt;Set xdebug.remote_connect_back=1 in php.ini&lt;br/&gt;&lt;code&gt; xdebug.remote_connect_back=1&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Set up dbg proxy. Read more:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://xdebug.org/docs/remote"&gt;&lt;a href="http://xdebug.org/docs/remote"&gt;http://xdebug.org/docs/remote&lt;/a&gt;&lt;/a&gt;, chapter - Multiple Users Debugging&lt;/li&gt;
&lt;li&gt;&lt;a href="http://derickrethans.nl/debugging-with-multiple-users.html"&gt;&lt;a href="http://derickrethans.nl/debugging-with-multiple-users.html"&gt;http://derickrethans.nl/debugging-with-multiple-users.html&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Set up ssh tunnel.   
&lt;ul&gt;&lt;li&gt;Enable remote_enable through php.ini or .htaccess&lt;br/&gt;&lt;code&gt; xdebug.remote_enable=1 &lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open ssh tunnel&lt;br/&gt;&lt;code&gt; ssh -N -R 9000:localhost:9000 sshusername@remote-server-name.com &lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ol&gt;</description><link>http://alexkhomenko.com/post/11015670822</link><guid>http://alexkhomenko.com/post/11015670822</guid><pubDate>Tue, 04 Oct 2011 11:26:00 +0300</pubDate><category>remote debug</category><category>xdebug</category><category>debug through ssh</category></item><item><title>Zend Framework, Db Profiler</title><description>&lt;p&gt;The simplest and the just awesome way to enable Db Profiler (as we  say dump queries) in Zend Framework is just add some params to you  configuration file. In my case it is application.ini:&lt;/p&gt;
&lt;p&gt;&lt;code&gt; resources.db.adapter = 'pdo_mysql'&lt;br/&gt; resources.db.params.host = 'localhost'&lt;br/&gt; resources.db.params.username = 'username'&lt;br/&gt; resources.db.params.password = 'password'&lt;br/&gt; resources.db.params.dbname = 'database'&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;em&gt;&lt;strong&gt;resources.db.params.profiler.enabled = true&lt;/strong&gt;&lt;/em&gt;&lt;br/&gt;&lt;em&gt;&lt;strong&gt; resources.db.params.profiler.class = "Zend_Db_Profiler_Firebug"&lt;/strong&gt;&lt;/em&gt;&lt;br/&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Install FirePHP and after reload you will see something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lsiaadXnzV1qzk4qg.png"/&gt;&lt;/p&gt;</description><link>http://alexkhomenko.com/post/10988673797</link><guid>http://alexkhomenko.com/post/10988673797</guid><pubDate>Mon, 03 Oct 2011 22:58:00 +0300</pubDate><category>zend framework</category><category>profiler</category><category>database</category><category>firephp</category></item><item><title>Kindle Cloud Reader</title><description>&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lqotv6AWxN1qzk4qg.png"/&gt;&lt;/p&gt;
&lt;p&gt;Couple of weeks ago Amazon release great application for reading books. You will say - &amp;#8220;So what? We&amp;#8217;ve already had applications for Mac, Win and mobile platforms&amp;#8221;.&lt;/p&gt;
&lt;p&gt;Yes you are right, it&amp;#8217;s just application for reading on the web. It works as offline application, so you can install it as Chrome Application and use even without Internet.&lt;/p&gt;
&lt;p&gt;It remembers where you finished reading previous time, shows highlights and can do other things. It has menu like Kindle Reader, so you can choose fonts, size.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s great thing also from web-developer point of view.&lt;/p&gt;</description><link>http://alexkhomenko.com/post/9542772762</link><guid>http://alexkhomenko.com/post/9542772762</guid><pubDate>Mon, 29 Aug 2011 14:48:39 +0300</pubDate></item><item><title>CSS rules weight</title><description>&lt;p&gt;As it usually appeared for me, unexpectedly - weight of attribute in CSS rules is equal to weight of class and values in attribute doesn&amp;#8217;t increase weight of rule.&lt;/p&gt;
&lt;p&gt;So these rules are equal by their weight:&lt;/p&gt;
&lt;pre&gt;a.link {
  color: blue;
}

a[rel] {
  color: red;
}

a[rel^=https] {
  color: green;
}
&lt;/pre&gt;</description><link>http://alexkhomenko.com/post/7775794530</link><guid>http://alexkhomenko.com/post/7775794530</guid><pubDate>Tue, 19 Jul 2011 00:47:32 +0300</pubDate></item><item><title>IE, CSS3 selectors, strange behaviour</title><description>&lt;p&gt;If css rule has CSS3 selectors, which IE doesn&amp;#8217;t understand, it passes them.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;Doesn&amp;#8217;t work:&lt;/span&gt;&lt;br/&gt;tr:nth-child(even),&lt;br/&gt;tr.even {&lt;br/&gt;    background-color: #eee;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span&gt;Work:&lt;/span&gt;&lt;br/&gt;tr:nth-child(even) {&lt;br/&gt;    background-color: #eee;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;tr.even {&lt;br/&gt;    background-color: #eee;&lt;br/&gt;}&lt;/p&gt;</description><link>http://alexkhomenko.com/post/6823583882</link><guid>http://alexkhomenko.com/post/6823583882</guid><pubDate>Thu, 23 Jun 2011 14:30:16 +0300</pubDate></item><item><title>WebKit color-stop procent in -webkit-gradient</title><description>&lt;p&gt;As I&amp;#8217;ve found out I can&amp;#8217;t use more than 100% in WebKit implementtation of linear-gradient. So I need &lt;strong&gt;150% in second color-stop &lt;/strong&gt;&lt;code&gt;-webkit-gradient(linear, left top, left bottom, color-stop(0, red), color-stop(1.5, blue));&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;WebKit implementation allow to use no more than 100%, but we can avoid this &amp;#8220;feature&amp;#8221; and use background-size: 1px 150%&lt;/p&gt;
&lt;p&gt;In first case I have &lt;a href="http://jsfiddle.net/okhomenko/GZP4x/"&gt;&lt;a href="http://jsfiddle.net/okhomenko/GZP4x/"&gt;http://jsfiddle.net/okhomenko/GZP4x/&lt;/a&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;#gradient {
    background-image: 
        -webkit-gradient(linear, left top, left bottom, 
                         color-stop(0, red), color-stop(&lt;strong&gt;1.5&lt;/strong&gt;, blue);
}&lt;/pre&gt;
&lt;p&gt;And get:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_llm0l8gapM1qzk4qg.png"/&gt;&lt;/p&gt;
&lt;p&gt;And in case &lt;a href="http://jsfiddle.net/okhomenko/GZP4x/1/"&gt;&lt;a href="http://jsfiddle.net/okhomenko/GZP4x/1/"&gt;http://jsfiddle.net/okhomenko/GZP4x/1/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;#gradient {
    height: 50px;
    
    background-image:
        -webkit-gradient(linear, left top, left bottom, 
                         color-stop(0, red), color-stop(&lt;strong&gt;1&lt;/strong&gt;, blue));
    &lt;strong&gt;background-size: 1px 150%;&lt;/strong&gt;
}
&lt;/pre&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_llm0s6SclE1qzk4qg.png"/&gt;&lt;/p&gt;
&lt;p&gt;So if you want to customize your gradient in WebKit you can use this method. In FF4 everything works fine just like this - &lt;code&gt;&lt;strong&gt;background-image: -moz-linear-gradient(top, red, blue 150%)&lt;/strong&gt;&lt;/code&gt;, so in some time I think it will work in WebKit&lt;/p&gt;</description><link>http://alexkhomenko.com/post/5739213210</link><guid>http://alexkhomenko.com/post/5739213210</guid><pubDate>Sun, 22 May 2011 21:38:00 +0300</pubDate><category>WebKit CSS3</category><category>css3</category><category>webkit gradient</category><category>gradient</category><category>Chrome</category></item><item><title>Gradient border</title><description>&lt;p&gt;Here I&amp;#8217;ve done some kind of border with gradient, maybe it would be useful for someone &lt;a title="Gradient border" href="http://jsfiddle.net/okhomenko/HdaRE/6/"&gt;&lt;a href="http://jsfiddle.net/okhomenko/HdaRE/6/"&gt;http://jsfiddle.net/okhomenko/HdaRE/6/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Gradient border" src="http://db.tt/nR2uD6U" width="158" height="203"/&gt;&lt;/p&gt;
&lt;p&gt;Code is pretty simple - we create box, put background-images on it and crop its with background-size. Also we should set bakground-repeat: no-repeat.&lt;/p&gt;
&lt;pre&gt;#bordergradient {
    background-image:
        -moz-linear-gradient(left   top, red,     #7BCBEF),
        -moz-linear-gradient(center top, blue,    #7BCBEF),
        -moz-linear-gradient(right  top, green,   #7BCBEF),
        -moz-linear-gradient(center top, #7BCBEF, rgba(123, 203, 239, 0));

    background-size:
        100% 1px,
        3px 100%,
        100% 2px,
        5px 100%;
        
    background-position:
        left top,
        right top,
        left bottom,
        left top;

    background-repeat:
        no-repeat;
}

&lt;/pre&gt;
&lt;p&gt;I used this technique like this&lt;/p&gt;
&lt;p&gt;&lt;img alt="Gradient border" src="http://dl.dropbox.com/u/931899/tumblr/gradient-border-FF.png" width="184" height="550"/&gt;&lt;/p&gt;</description><link>http://alexkhomenko.com/post/5733530791</link><guid>http://alexkhomenko.com/post/5733530791</guid><pubDate>Sun, 22 May 2011 18:36:21 +0300</pubDate><category>gradient border</category><category>css3</category></item><item><title>Inset shadow from one side</title><description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; It&amp;#8217;s appeared as it should be much simpler than my solution, we can just use: box-shadow: inset 0&amp;#160;10px 20px -10px #444;&lt;/p&gt;
&lt;p&gt;Thanks to @&lt;a title="LeaVerou" href="http://twitter.com/#!/LeaVerou"&gt;LeaVerou&lt;/a&gt; for help&lt;/p&gt;
&lt;hr&gt;&lt;p&gt;Some time ago I needed shadow inside block, but inset shadow by box-shadow: inset I didn&amp;#8217;t like because it render from all sides and I wanted only top-side shadow, so I&amp;#8217;ve tried to do it with gradient. And here is what I get - &lt;a title="Inset shadow one side via gradient" href="http://jsfiddle.net/okhomenko/fUWPu/5/"&gt;&lt;a href="http://jsfiddle.net/okhomenko/fUWPu/5/"&gt;http://jsfiddle.net/okhomenko/fUWPu/5/&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s not so g0od in Opera (right image). I would be appreciated if someone know how to  modify my code for work good in Opera and make it render in IE&lt;/p&gt;
&lt;p&gt;&lt;img align="left" height="200" width="150" src="http://dl.dropbox.com/u/931899/tumblr/inset-shadow-gradient.png" alt="Inset shadow from top via gradient"/&gt;&lt;img align="right" height="200" width="150" src="http://dl.dropbox.com/u/931899/tumblr/inset-shadow-gradient-opera.png" alt="Inset shadow from top via gradient in Opera"/&gt;&lt;/p&gt;</description><link>http://alexkhomenko.com/post/5732243961</link><guid>http://alexkhomenko.com/post/5732243961</guid><pubDate>Sun, 22 May 2011 17:48:00 +0300</pubDate><category>css shadow</category><category>inset shadow</category><category>gradient shadow</category></item></channel></rss>

