Skip to content

Instantly share code, notes, and snippets.

View limarc's full-sized avatar
🚀

Alex Lobashev limarc

🚀
  • Cyprus, Limassol
View GitHub Profile
@limarc
limarc / duplicate-stylesheets.js
Last active August 29, 2015 14:08
Determination of duplicate stylesheets
/**
* Поиск дублированных стилей
*
* @param {Mixed} collection Коллекция
*/
function duplicates(collection) {
var maps = [], path = '', key = 0;
if (!Array.isArray(collection)) {
collection = [].slice.apply(collection);
@limarc
limarc / in-between-margin-trick.css
Created October 23, 2014 07:29
In between margin trick
/* Old */
.classname {
...
margin-top: 20px;
}
.classname:first-child {
margin-top: 0;
}
var timing = window.performance.timing,
metrics = {
dns: timing.domainLookupEnd - timing.domainLookupStart,
tcp: timing.connectEnd - timing.connectStart,
request: timing.responseStart - timing.requestStart,
response: timing.responseEnd - timing.responseStart,
paint: timing.domContentLoadedEventEnd - timing.domLoading,
dom: timing.domComplete - timing.domLoading,
total: timing.loadEventEnd - timing.navigationStart
};
@limarc
limarc / spoiler.js
Last active August 29, 2015 14:04
Spoiler ui
/*
* ...
*/
(function(global) {
'use strict';
/*
* Constructor.
*
* @param {Mixed} element The jquery object or selector.
// inherit.js
var inherit = function(parent, child) {
var _ = function() {};
_.prototype = parent.prototype;
child.prototype = new _();
child.prototype.constructor = child;
};
// inherit-es5.js
@limarc
limarc / sublime-settings.json
Last active December 15, 2017 12:40
My Sublime Text 3 settings
{
"always_show_minimap_viewport": true,
"auto_complete": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"file_exclude_patterns":
[