Skip to content

Instantly share code, notes, and snippets.

View juanpasolano's full-sized avatar
💻
Making

Juan Pablo Solano juanpasolano

💻
Making
View GitHub Profile
@juanpasolano
juanpasolano / gist:6442597
Last active December 22, 2015 08:08
Serialize Object: extends jquery
/*
|-----------------------------------------------------------------------------
| Serialize Object
|-----------------------------------------------------------------------------
*/
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
@juanpasolano
juanpasolano / gist:5103886
Created March 6, 2013 22:46
brackets higlight for theme in sublime text
<!-- Brackets highligut -->
<dict>
<key>name</key>
<string>Bracket all</string>
<key>scope</key>
<string>bracket.all</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#ff0000</string>
@juanpasolano
juanpasolano / gist:4770804
Last active December 12, 2015 12:19
CSS: attribute selectors
li[class~='red'] {} /*Selects all li that have the class red and other classes*/
li[class|='red'] {} /*Selects li that have hyphen separeted values, ie: 'red-button', 'red-external'*/
li[class*='red'] {} /*selects all li that have the a class tat has red in it ie: 'ared', 'redid', 'xxxxxred'*/
li[class^='red'] {} /*Selects all li which class starts with 'red', ie: 'redid', 'redxxx'*/
li[class$='red'] {} /*selects li which class ends with value 'red', ie: 'xxxred', 'ared'*/
@juanpasolano
juanpasolano / gist:4722768
Last active December 12, 2015 05:38
CSS: clearfix
.clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
@juanpasolano
juanpasolano / gist:4722766
Last active December 12, 2015 05:38
html: new Document
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie7"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=1024, maximum-scale=2" />
<title></title>