Skip to content

Instantly share code, notes, and snippets.

@cesarhdz
cesarhdz / _clearfix.scss
Created March 19, 2013 04:17
Nicholas Gallaghherclearfix port to scss, ready to use as mixin or via @extend
/**
* Clearfix Abstraction
* Based on nicholas Gallagher microclearfix
* http://nicolasgallagher.com/micro-clearfix-hack/
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
@cesarhdz
cesarhdz / SublimeProjectGrails.json
Last active December 14, 2015 14:29
Sublime grails project configuration
{
"folders":
[
{
"path": "$project",
"folder_exclude_patterns" : [
"target-eclipse"
,"target"
,"scripts"
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@cesarhdz
cesarhdz / sublime:Fetch-Files.json
Created November 22, 2012 11:59
Nettuts Fetch plugin files and packages repos
{
"files":
{
"enquire": "https://raw.github.com/WickyNilliams/enquire.js/master/dist/enquire.min.js"
,"jquery": "http://code.jquery.com/jquery.min.js"
,"modernizr": "blob:http%3A//modernizr.com/977605ec-df68-467a-afd3-e47db09d2502"
},
"packages":
{
"bootstrap": "http://twitter.github.com/bootstrap/assets/bootstrap.zip"
@cesarhdz
cesarhdz / fauxrows.css
Created October 27, 2012 21:18
Equal Rows Height
// Taken from: http://css-tricks.com/equal-height-blocks-in-rows/
var currentTallest = 0,
currentRowStart = 0,
rowDivs = new Array(),
$el,
topPosition = 0;
$('.blocks').each(function() {
@cesarhdz
cesarhdz / gist:3794927
Created September 27, 2012 16:22 — forked from trepmal/gist:1566525
WordPress: Breadcrumb Functions
<?php
/*
Plugin Name: Breadcrumb Functions
Description: Functions for displaying breadcrumbs when working with hierarchical post types. Does nothing out-of-the-box, functions must be added to theme (directly or via hooks, your discretion).
Author: Kailey Lampert
Author URI: http://kaileylampert.com/
*/
/*
Basic:
echo get_breadcrumbs( $post );
// data uri test.
// https://github.com/Modernizr/Modernizr/issues/14
// This test is asynchronous. Watch out.
// in IE7 in HTTPS this can cause a Mixed Content security popup.
// github.com/Modernizr/Modernizr/issues/362
// To avoid that you can create a new iframe and inject this.. perhaps..
@cesarhdz
cesarhdz / get-sprite.scss
Created September 6, 2012 21:01 — forked from dfadler/get-sprite.sass
A SASS mixin for generating a sprite declaration block that will work with media queries, in SCSS
// http://compass-style.org/reference/compass/helpers/sprites/
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true)
{
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
$sprite-image: sprite-file($map, $sprite);
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url
$sprite-map: sprite-url($map);
@cesarhdz
cesarhdz / get-sprite.sass
Created September 6, 2012 20:59 — forked from antonkor/get-sprite.sass
A SASS mixin for generating a sprite declaration block that will work with media queries. UPDATE: Having offset-x & -y are very nice ;)
// http://compass-style.org/reference/compass/helpers/sprites/
@mixin get-sprite($map, $sprite, $offset-x: 0, $offset-y: 0, $repeat: no-repeat, $height: true, $width: true)
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
$sprite-image: sprite-file($map, $sprite)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url
$sprite-map: sprite-url($map)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position
@cesarhdz
cesarhdz / template.jquery.js
Created May 15, 2012 17:44
JQUERY: Plugin Template
/**
* myPluginName jQuery plugin
* @author
* @version
* @date
*/
(function($){
//Default options
$.myPluginName = {