Skip to content

Instantly share code, notes, and snippets.

View aslansky's full-sized avatar

Alexander Slansky aslansky

View GitHub Profile
jQuery('element-identifier').plugin({
option1: 'value1',
option2: 'value2',
option3: 'value3'
});
@aslansky
aslansky / gist:1408374
Created November 30, 2011 07:49
jQuery Plugins with yepnope
yepnope({
load: '/url/to/your/script.js',
callback: function (url, result, key) {
$('body').initPlugins();
}
});
@aslansky
aslansky / gist:8741515
Created January 31, 2014 19:44
gulp livereload (gulp 3.5.0)
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var lr = require('tiny-lr');
var http = require('http');
var path = require('path');
var ecstatic = require('ecstatic');
var tlr = lr();
var livereload = function (evt, filepath) {
tlr.changed({
// browserify
var browserify = require('browserify');
var es6ify = require('es6ify');
// gulp stuff
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var source = require('vinyl-source-stream');
var jshint = require('gulp-jshint');
var livereload = require('gulp-livereload');
var watch = require('gulp-watch');
{{#each layouts}}
{{#each layout.items}}
${{cssesc meta.name}}: -{{x}}px -{{y}}px {{width}}px {{height}}px;
{{/each}}
{{#each sprites}}
{{#if dpi}}
@media (-webkit-min-device-pixel-ratio: {{ratio}}), (min-resolution: {{dpi}}dpi) {
{{/if}}
.{{cssesc ../classname}} {