Skip to content

Instantly share code, notes, and snippets.

/* [ equal height cols ] */
var currentTallest = 0,
currentRowStart = 0,
rowDivs = new Array(),
$el,
topPosition = 0;
$('.eq-height').each(function() {
$el = $(this);
topPostion = $el.position().top;
@ElmahdiMahmoud
ElmahdiMahmoud / gist:27ffde57b61637cf3cca
Created June 23, 2014 07:41
jquery: serializeObject
$.fn.serializeObject = function(){
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
@ElmahdiMahmoud
ElmahdiMahmoud / SassMeister-input.scss
Created June 17, 2014 11:16
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
$fw: null !default;
$fs: null !default;
$lh: null !default;
$ff: null !default;
'use strict';
// Declare app level module which depends on filters, and services
var app= angular.module('myApp', ['ngRoute']);
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/login', {templateUrl: 'partials/login.html', controller: 'loginCtrl'});
$routeProvider.otherwise({redirectTo: '/login'});
}]);
@ElmahdiMahmoud
ElmahdiMahmoud / SassMeister-input.scss
Created April 9, 2014 10:13
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@mixin fontsize($size:1.6, $line: $size * 1.5){
font-size: ($size * 10) + px;
line-height: ($line * 10) + px;
font-size: $size + rem;
line-height: $line + rem;
@ElmahdiMahmoud
ElmahdiMahmoud / gist:9974753
Created April 4, 2014 13:29
Ordered List CSS Styles
ol.mylist {
list-style-type: none;
counter-reset: ol-counter;
}
ol.mylist > li:before {
content: counter(ol-counter);
counter-increment: ol-counter;
}
@ElmahdiMahmoud
ElmahdiMahmoud / gist:9685159
Created March 21, 2014 12:28
Counter list
.counter-list {
counter-reset: counter;
dd,
dt {
padding-left: 50px;
position: relative;
font-weight: $font-weight-light;
margin-bottom: 20px;
}
@ElmahdiMahmoud
ElmahdiMahmoud / gist:9681051
Created March 21, 2014 07:06
Equal Height Blocks in Rows
// copied from http://css-tricks.com/equal-height-blocks-in-rows/
var currentTallest = 0,
currentRowStart = 0,
rowDivs = new Array(),
$el,
topPosition = 0;
$('.eq-height').each(function() {
$el = $(this);
@ElmahdiMahmoud
ElmahdiMahmoud / SassMeister-input.scss
Created March 20, 2014 08:44
Sass: cross all heading
// ----
// Sass (v3.3.3)
// Compass (v1.0.0.alpha.18)
// ----
#{headings()} {
a,
a:hover {
color: inherit;
}
// Generated on 2013-07-30 using generator-webapp 0.2.6
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down: