This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'optparse' | |
# options hash to store parsed results | |
options = {} | |
# initialize option parser | |
OptionParser.new do |opts| | |
# provide banner with basic usage example | |
opts.banner = "USAGE do awesome stuff" | |
# our rule to parse | |
opts.on("-m", "--magick", "This stores our magick value") do |v| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read( | |
Rails.root.join("config/routes/#{routes_name}.rb") | |
)) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bootstrap example | |
.row | |
.col-md-12 | |
.col-md-4 | |
%button.btn.btn-default.btn-lg | |
// semantic ui example | |
.row | |
.twelwe.wide.colum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Player = require('player') | |
player = new Player(process.argv[2]); | |
player.play(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('browser-sync', function() { | |
browserSync({ | |
open: false, | |
server: { | |
baseDir: './dist', | |
middleware: [historyApiFallback] | |
} | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////// | |
// 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////// | |
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "breakpoint-slicer/variables", | |
"breakpoint-slicer/helper-functions", | |
"breakpoint-slicer/mixins"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |