Skip to content

Instantly share code, notes, and snippets.

@ezhlobo
ezhlobo / 2store.sh
Created September 30, 2012 10:54
Zip vkleaner's files to update extension on chrome web store.
#!/bin/bash
version=`head -n 3 manifest.json | tail -1 | grep -Po '"version": "\K.*?(?=")'`
zip -r -b "./" tmp/webstore/$version.zip * -x "tmp/*"
@ezhlobo
ezhlobo / jquery_main.js
Last active December 11, 2015 12:08
JS framework: overall
(function() {
var root = this,
_tool = root.tool,
_$$ = root._$$,
tool = function(selector, context) {
return new tool.fn.init(selector, context);
};
@ezhlobo
ezhlobo / hata.events.js
Created February 27, 2013 19:34
Hata extensions
(function( hata ) {
hata.extend({
bind: function( eventType, callback ) {
return this.each(function() {
this.addEventListener( eventType, callback, false );
});
},
@ezhlobo
ezhlobo / 1. Example.scss
Created April 17, 2013 18:04 — forked from Integralist/1. Example.scss
Mixins for SCSS animation
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@ezhlobo
ezhlobo / hata.animate.js
Created June 13, 2013 15:50
Animate with hata framework
/*
Usage:
hata.animate( stepFunction, params );
Params:
* duration - animation time
* delay - pause between repeating
* type - type of delta incrementing
* delta - increment function
* done - functin after animation
@ezhlobo
ezhlobo / sitemap.html.erb
Created January 17, 2014 20:44
Middleman sitemap
<ol>
<% sitemap.resources .select{|page| page.url =~ /\.html/} .map{|page| page.url.gsub(/^\//, '')} .sort .each do |url| %>
<li><a target="_blank" href="<%= "#{url}" %>"><%= "#{url}" %></a></li>
<% end %>
</ol>

Общее

  • Максимальная длина строки с правилами и селекторами - 80 символов.
  • Все свойства и селекторы на новой строке.

Описание свойства

Обычное свойство:

селектор {
@ezhlobo
ezhlobo / Preferences.sublime-settings
Last active August 29, 2015 14:13
Sublime Settings: User
{
"always_show_minimap_viewport": true,
"animation_enabled": false,
"bold_folder_labels": true,
"close_windows_when_empty": false,
"disable_tab_abbreviations_for_scopes": "source.css, source.scss",
"ensure_newline_at_eof_on_save": true,
"font_size": 12,
"hayaku_CSS_colors_case": "lowercase",
"hayaku_CSS_prefixes_disable": true,
(function($) {
$.fn.outerHtml = function() {
return this[0].outerHTML;
};
})(jQuery);
@ezhlobo
ezhlobo / smartresize.js
Last active August 29, 2015 14:19
Debounced resize events
/*
smartresize(function() {
// Handle the resize event here
});
// Executing after loading
smartresize(function() {
// Handle the resize event here
})();