Skip to content

Instantly share code, notes, and snippets.

View vitalyrotari's full-sized avatar
🦥
I may be slow to respond.

Vitaly Rotari vitalyrotari

🦥
I may be slow to respond.
  • Everywhere
  • Chisiau, Moldova Republic of
  • 06:10 (UTC +03:00)
View GitHub Profile
//detect Internet Explorer and version number through injected conditional comments (no UA detect, no need for cond. compilation / jscript check)
//version arg is for IE version (optional)
//comparison arg supports 'lte', 'gte', etc (optional)
var isIE = (function(undefined){
var doc = document,
doc_elem = doc.documentElement,
cache = {},
@vitalyrotari
vitalyrotari / bootstrap.php
Created February 16, 2012 11:30
Language support for FuelPHP
/**
* app/bootstrap.php
*/
Autoloader::add_classes(array(
// Add classes you want to override here
// Example: 'View' => APPPATH.'classes/view.php',
'Uri' => APPPATH.'classes/uri.php',
'LayoutHelper' => APPPATH.'classes/layouthelper.php',
));
@vitalyrotari
vitalyrotari / dabblet.css
Created May 1, 2012 02:08
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background: #ccc;
}
div {
height: 107px;
}
.digit {
@vitalyrotari
vitalyrotari / app.css
Created July 30, 2012 11:34
Pages Slide
body {
font-family: "Helvetica Neue", Arial;
font-size: 16px;
padding: 0;
margin: 0;
}
header {
background-color: #262626;
position: relative;
@vitalyrotari
vitalyrotari / app.coffee
Created August 1, 2012 15:27
Mobile Gallery
((window) ->
"use strict"
$ = window.Zepto
screen = window.screen
document = window.document
hasOwn = (obj, key) ->
obj.hasOwnProperty key
@vitalyrotari
vitalyrotari / device.js
Created August 2, 2012 12:41
Detect Mobile Devices
var Device = {
ENV_DESKTOP: 'desktop',
ENV_PHONE: 'phone',
ENV_TABLET: 'tablet',
ENV_PORTRAIT: 'portrait',
ENV_LANDSCAPE: 'landscape',
agent: {
mobile: (/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(window.navigator.userAgent.toLowerCase())),
tablet: (/ipad|android|android\s3\.0|xoom|sch-i800|playbook|tablet|kindle/i.test(window.navigator.userAgent.toLowerCase()))
},
@vitalyrotari
vitalyrotari / Custom.css
Created November 6, 2012 05:50
Chrome DevTool Color Theme
/**********************************************/
/*
/* enlightened Theme for Chrome DevTools by Vincent Mac
/* Forked from mnml Theme for Chrome DevTools by Michael P. Pfeiffer
/*
/**********************************************/
#-webkit-web-inspector #main {
background-color: #1d1f21 !important;
}
#-webkit-web-inspector tr {
@vitalyrotari
vitalyrotari / touch.js
Last active October 22, 2021 22:01
jQuery Touch Gestures
jQuery Touch Gestures ported from QUOjs
@see http://quojs.tapquo.com/
Version 1.1
-- @add singleTap event
-- @fix doubleTap event
-- @fix hold event
@vitalyrotari
vitalyrotari / nexus7.css
Created November 9, 2012 12:30
Nexus 7 - CSS Media Query
@media only screen and (min-device-width: 800px) and (orientation: portrait) {
#device:after {
content: "Nexus 7 - portrait - firefox";
}
}
@media screen and (min-device-width : 602px) and (orientation: portrait) {
#device:after {
content: "Nexus 7 - portrait - chrome";
}
}
@vitalyrotari
vitalyrotari / fx.js
Created November 9, 2012 12:40
jQuery FX Effects - Ported from ZeptoJS
// Zepto.js
// (c) 2010-2012 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
(function ($, undefined) {
var prefix = '', eventPrefix, endEventName, endAnimationName,
vendors = { Webkit: 'webkit', Moz: '', O: 'o', ms: 'MS' },
document = window.document, testEl = document.createElement('div'), docElem = document.documentElement,
supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,
transform,
transitionProperty, transitionDuration, transitionTiming,