May 2012
1 post
Vika Zhurbas: потому что жизнь без движения не... →
vikazhurbas:
потому что жизнь без движения не имеет смысла потому что стоять на месте нудно-скучно потому что бурление и кипение в организме эмоций это нужно потому что ломаются стихи когда теряешь мысль и рифму также ломается жизнь когда теряешь смысл
двадцать восьмое апреля одиннадцатого
November 2011
1 post
Closures in CoffeeScript
Closures in CoffeeScript are implementing very simple:
window.MusicBox =
module: (->
modules = {}
(name) ->
if modules[name]
modules[name]
else
modules[name] =
Views: {}
)()
https://github.com/jashkenas/coffee-script/issues/43
October 2011
4 posts
Тот, кто уходит, становится тяжелее,
с каждым шагом делаясь все моложе,
с...
– (via iv-0lga)
3 tags
Save images in local storage as data URI
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.
Now I’m doing the backbone app and I save models in localStorage. So only images are not saved locally. And I’ve got thought about saving non-decorative images in localStorage as data...
3 tags
Remote debug php-application with xdebug
I debug applications for a while with xdebug on local machine. I just set xdebug.remote_enable = 1 in php.ini and that’s all.
Tomorrow I have need to debug application on remote host and I couldn’t do this. So after some investigation I’ve found some solutions for remote debug:
Set xdebug.values in .htaccess: php_value xdebug.remote_enable on php_value xdebug.remote_host...
4 tags
Zend Framework, Db Profiler
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:
resources.db.adapter = 'pdo_mysql' resources.db.params.host = 'localhost' resources.db.params.username = 'username' resources.db.params.password = 'password' resources.db.params.dbname = 'database'
...
August 2011
1 post
Kindle Cloud Reader
Couple of weeks ago Amazon release great application for reading books. You will say - “So what? We’ve already had applications for Mac, Win and mobile platforms”.
Yes you are right, it’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.
It remembers where you finished...
July 2011
1 post
CSS rules weight
As it usually appeared for me, unexpectedly - weight of attribute in CSS rules is equal to weight of class and values in attribute doesn’t increase weight of rule.
So these rules are equal by their weight:
a.link {
color: blue;
}
a[rel] {
color: red;
}
a[rel^=https] {
color: green;
}
June 2011
1 post
IE, CSS3 selectors, strange behaviour
If css rule has CSS3 selectors, which IE doesn’t understand, it passes them. Doesn’t work: tr:nth-child(even), tr.even { background-color: #eee; } Work: tr:nth-child(even) { background-color: #eee; } tr.even { background-color: #eee; }
May 2011
3 posts
5 tags
WebKit color-stop procent in -webkit-gradient
As I’ve found out I can’t use more than 100% in WebKit implementtation of linear-gradient. So I need 150% in second color-stop -webkit-gradient(linear, left top, left bottom, color-stop(0, red), color-stop(1.5, blue));
WebKit implementation allow to use no more than 100%, but we can avoid this “feature” and use background-size: 1px 150%
In first case I...
2 tags
Gradient border
Here I’ve done some kind of border with gradient, maybe it would be useful for someone http://jsfiddle.net/okhomenko/HdaRE/6/
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.
#bordergradient {
background-image:
-moz-linear-gradient(left top, red, #7BCBEF),
...
3 tags
Inset shadow from one side
Update: It’s appeared as it should be much simpler than my solution, we can just use: box-shadow: inset 0 10px 20px -10px #444;
Thanks to @LeaVerou for help
Some time ago I needed shadow inside block, but inset shadow by box-shadow: inset I didn’t like because it render from all sides and I wanted only top-side shadow, so I’ve tried to do it with gradient. And here is what...