Skip to content

Instantly share code, notes, and snippets.

@marcialca
marcialca / yeoman-jade
Created July 26, 2013 07:00
Jade Support for Yeoman
Install grunt-contrib-jade
(sudo) npm install grunt-contrib-jade --save-dev
Create the JADE Task:
jade: {
dist: {
options: {
pretty: true
},
@marcialca
marcialca / seo.html
Created August 11, 2013 19:13
SEO for JS SPA
<meta name="fragment" content="!">
@marcialca
marcialca / config.rb
Last active December 30, 2015 18:09 — forked from nathansmith/config.rb
preferred_syntax = :sass
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
line_comments = true
# output_style = :compressed
# sass_options = {:sourcemap => true}
@marcialca
marcialca / jshintrc
Created July 14, 2014 16:52
JsHint Config Example
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
#! /usr/bin/env bash
if [ -z "$1" ]; then
echo "Please specify a directory as the first argument."
exit 1
fi
if [ ! -d "$1" ]; then
echo "Not a valid directory."
exit 1
fi
@marcialca
marcialca / SassMeister-input.scss
Created September 25, 2014 21:22
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@mixin query($breakpoint, $orientation:portrait, $qval: min) {
@if $breakpoint == 'small' {}
@if $breakpoint == 'medium' {}
@if $breakpoint == 'large' {}
@else {
@marcialca
marcialca / SassMeister-input.scss
Last active August 29, 2015 14:06
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@function map-getter($listmap, $value) {
@each $item in $listmap {
$index: index($item, $value);
@if $index {
$return: if($index == 1, 2, $index);
@marcialca
marcialca / SassMeister-input-HTML.html
Last active August 29, 2015 14:07
Generated by SassMeister.com.
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis, praesentium ipsam officia ratione laboriosam, aspernatur, consequatur dolorem quibusdam minima at, fuga aliquam? Maxime architecto, nesciunt ea impedit mollitia! Nesciunt, quia.</p>
@marcialca
marcialca / SassMeister-input.scss
Created November 19, 2014 22:42
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
// List map-like value getter
// -------------------
// To simulate associative arrays
// Source: http://hugogiraudel.com/2013/08/12/sass-functions/#mapping
/*!
An experiment in getting accurate visible viewport dimensions across devices
(c) 2012 Scott Jehl.
MIT/GPLv2 Licence
*/
function viewportSize(){
var test = document.createElement( "div" );
test.style.cssText = "position: fixed;top: 0;left: 0;bottom: 0;right: 0;";