Skip to content

Instantly share code, notes, and snippets.

View thedaviddias's full-sized avatar
👋
Building something new...

David Dias thedaviddias

👋
Building something new...
View GitHub Profile
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
// This code will only work if you use Sass 3.3 (or higher
// Configuration :
// -----------------------------------------
$screensizes : (
'default' : 0 infinity,
'mobile' : 0 767px,
'phone' : 0 480px,
'tablet' : 481px 767px,
// HTML:
<div class="display-type"></div>
// CSS:
// set the content of an element depending on the media query
@thedaviddias
thedaviddias / SassMeister-input.scss
Created July 10, 2014 21:48
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
$themeName: Z;
@mixin theme($themeName) {
@if $themeName == z {
@content;
'use strict';
var gulp = require( 'gulp' ),
gutil = require( 'gulp-util' ),
fork = require( 'child_process' ).fork,
tinyLr = require( 'tiny-lr' ),
async = require( 'async' );
var dirs = {
app: [
<iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=ru&amp;ie=UTF8&amp;output=embed&amp;q={address}"></iframe>
@thedaviddias
thedaviddias / rem
Created August 11, 2014 04:20 — forked from xonic/rem
// Mixin that allows to specify arbitrary CSS properties with
// unitless numbers. The output has rem unit with pixel fallback.
// Shorthand assignments are supported too!
$base_line: 10;
@mixin rem($property, $values, $important:"")
{
// Placeholder variables
$shorthand_px: "";
$shorthand_rem: "";
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@thedaviddias
thedaviddias / SassMeister-input.scss
Created August 17, 2014 20:04
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
$program: beinggirl;
$category-name: mybody mylife mycircle mystyle create;
@mixin program($theme) {
@if $theme == $program {
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?