Skip to content

Instantly share code, notes, and snippets.

View makefunstuff's full-sized avatar
😇
Why?

Iurii Plugatariov makefunstuff

😇
Why?
View GitHub Profile
@makefunstuff
makefunstuff / gulpfile.babel.js
Last active August 29, 2015 14:27 — forked from stephensauceda/gulpfile.babel.js
ES6 Gulpfile Example
/*
* Steps
* 1. Rename your gulpfile.js to gulpfile.babel.js
* 2. Add babel to your package.json (npm install -D babel)
* 3. Start writing ES6 in your gulpfile!
*/
import gulp from 'gulp'; // ES6 imports!
import sass from 'gulp-sass';
@makefunstuff
makefunstuff / jade.js
Created June 7, 2015 21:42
determine current view
gulp.task('views', function() {
var views = config.views
return gulp.src(views.src)
.pipe($.plumber({errorHandler: $.notify.onError("Error: <%= error.message %>")}))
.pipe($.data(function(file) {
return _.extend(config.app, {currentView: path.basename(file.path).replace('.jade', '')})
}))
.pipe($.jade({
pretty: true,
data: config.app
@import "breakpoint-slicer/variables",
"breakpoint-slicer/helper-functions",
"breakpoint-slicer/mixins";
//////////////////////////////
// Default Variables
//////////////////////////////
// Default Features
$breakpoint-default-media: all !default;
$breakpoint-default-feature: min-width !default;
$breakpoint-default-pair: width !default;
// Default Transforms
$breakpoint-force-media-all: false !default;
////////////////////////////////////////////////
// If you don't understand what's going on here,
// please read the README first.
////////////////////////////////////////////////
// Wraps the content block provided with a media query
// with min-width equal to the left edge of the left slice
// and max-width equal to the right edge of the right slice
//
// between($slice-left, $slice-right, $no-query: false)
// Returns a correction value for the given breakpoint
// to prevent media query overlapping.
//
// Relies on the global variable $slicer-anti-overlap-corrections
// that should contain a list of allowed correction values.
//
// Returns either only positive or only negative value.
//
// anti-overlap-correction($bp, $positive: true)
// - $bp : a breakpoint, e. g. 800px or 20em
gulp.task('browser-sync', function() {
browserSync({
open: false,
server: {
baseDir: './dist',
middleware: [historyApiFallback]
}
});
});
var Player = require('player')
player = new Player(process.argv[2]);
player.play();
// bootstrap example
.row
.col-md-12
.col-md-4
%button.btn.btn-default.btn-lg
// semantic ui example
.row
.twelwe.wide.colum
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(
Rails.root.join("config/routes/#{routes_name}.rb")
))
end
end