Skip to content

Instantly share code, notes, and snippets.

View marcelosomers's full-sized avatar

Marcelo Somers marcelosomers

View GitHub Profile
@marcelosomers
marcelosomers / SassMeister-input.scss
Created May 30, 2014 15:27
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// _configuration.scss
$base-path: '../bundles/assets/';
$image-path: $base-path + 'images/';
$font-path: $base-path + 'fonts/';
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
$base-path: "assets/" !default;
/**
* Asset handler
*
@marcelosomers
marcelosomers / alpha-channel.scss
Last active August 29, 2015 14:04
Supporting Alpha Channels in old versions of IE without CSS bloat
/**
* The goal here is to simplify implementing alpha channels when requiring support of
* old versions of IE that do not support rgba values. For modern browsers, it'll only output
* the rgba value of a color, but for <IE9, it'll first output the solid version of the color
* with no opacity.
*/
/**
@marcelosomers
marcelosomers / Module.js
Created September 10, 2014 15:30
JavaScript Module Pattern
var App = App || {};
App.Section = App.Section || {};
App.Section.Script = function () {
// Initialize global functions
function initalizeDomElements() {
}
@marcelosomers
marcelosomers / responsive.scss
Created September 28, 2014 18:28
Responsive Breakpoint Handler
/**
* Responsive breakpoint, to be used as @include breakpoint(name) {}
*/
@mixin breakpoint($name) {
@if map-has-key($breakpoints, $name) { // 1
@media #{inspect(map-get($breakpoints, $name))} { // 2
@content;
}
}
@else { // 3
@marcelosomers
marcelosomers / gist:07e7e472e7b589ba0081
Created October 15, 2014 16:05
2 Variable Width side by side divs
/*
The wider content that should fill all remaining width - this one will resize
*/
.fluid {
width: 99%;
display: table-cell;
}
/*
The narrower content that should take up all necessary space - this one will not resize
#! /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
@marcelosomers
marcelosomers / SassMeister-input-HTML.html
Created November 13, 2015 02:59 — forked from csswizardry/SassMeister-input-HTML.html
Alert users about using a deprecated selector
<h1 class="foo">Lorem ipsum dolor sit amet.</h1>
<p class="error">Lorem ipsum dolor sit amet.</p>
@marcelosomers
marcelosomers / new_laptop_setup.md
Last active December 27, 2015 12:09
New Mac Set Up
@marcelosomers
marcelosomers / serve-guardfile
Last active December 31, 2015 00:08
A base guardfile for using guard-livereload on Serve (http://get-serve.org/)
# A Guardfile for Serve (http://get-serve.org/)
guard 'livereload' do
watch(%r{views/.+\.(erb|haml|slim)$})
watch(%r{public/.+\.(css|js|html)})
watch(%r{stylesheets/.+\.(scss|sass)})
end