Skip to content

Instantly share code, notes, and snippets.

View IOZ's full-sized avatar
🏠
Working from home office

Igor Zimnitskiy IOZ

🏠
Working from home office
View GitHub Profile
@IOZ
IOZ / cssAutoReloader.js
Last active August 29, 2015 14:14
css auto reloader
/**
* Css auto reload
* NOTE!!! remove on production
*/
(function() {
'use strict';
var CssReload = {
config: {
keyCode: 83
@IOZ
IOZ / Tags.xml
Last active August 29, 2015 14:13
xml tags descriptions
<!-- CACHE
------------------------------------------------>
<iscache type="relative" hour="24"/>
type:
- relative
hour - cache lifetime in hours
minute - cache lifetime in minutes
@IOZ
IOZ / plugin.js
Created March 26, 2014 17:24
jquery plugin pattern
if (typeof Object.create !== "function") {
Object.create = function (obj) {
function F() {}
F.prototype = obj;
return new F();
};
}
(function ($, window, document) {
@IOZ
IOZ / main.js
Created March 18, 2014 15:26
Selectik
(function(){
var eventMatchers = {
'HTMLEvents': /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
'MouseEvents': /^(?:click|mouse(?:down|up|over|move|out))$/
}
var defaultOptions = {
pointerX: 0,
pointerY: 0,
button: 0,
@IOZ
IOZ / module.js
Created March 14, 2014 09:07
Pattern Module
/**
* Pattern Module
* p - parent object
* t - reference to this into the module
*/
var App;
App = (function(){
return {};
@IOZ
IOZ / module.js
Created March 12, 2014 17:21
Modular js architecture
var MODULE = {};
/* User page */
MODULE.User = (function(module){
var username = '';
var methods = {
setName: function(name){
username = name;
@IOZ
IOZ / GetViewPort.js
Last active August 29, 2015 13:55
Get window viewport width and height
/**
* Get window viewport width
* @param side {string} - (width|height|both)
*
* Usage getViewPort('width'); // return viewport width
*/
function getViewPort(side){
var side = side || 'both';
var viewport = { width: 0, height: 0 };
@IOZ
IOZ / jquery_project_pattern.js
Created February 3, 2014 11:50
Project pattern
/**
* Application
* @constructor
*/
function App(){
var T = this;
this.body = $("body");
this.doc = $(document);
this.win = $(window);