Skip to content

Instantly share code, notes, and snippets.

View stoyanvi's full-sized avatar

Stoyan Ivanov stoyanvi

  • Sofia, Bulgaria
View GitHub Profile
// How I would approach a fluid grid:
//
// [1] Let the name reflect the % width,
// eliminating "1 of 12" guesswork.
//
// [2] Also, put 10px of padding to either
// side, to stack and make a 20px gutter.
//
// [3] Make the box-sizing = border-box, so that
// 50% + 20px total side padding = 50%, etc.
angular.module('foo', [])
.config(function($provide) {
$provide.decorator('$rootScope', function ($delegate) {
// Shim needed for browsers I don't care about
var proto = Object.getPrototypeOf($delegate);
proto.$bar = function() {
// Do something
};
/*
Author: Joshua P. Mervine <joshua@mervine.net> [github.com/jmervine]
See: http://jsfiddle.net/jmervine/dqA9r/5/
Use:
<script src="http://cdn.mervine.net/FormattedDate.js" />
<script src="http://cdn.mervine.net/FormattedDate.min.js" />
var SimpleHashTable = function(hashCode) {
var table = [];
var Constructor = function() { };
Constructor.prototype.add = function(opts) {
};
return new Constructor();
}
module.exports.SimpleHashTable = SimpleHashTable;
// Router object
var Router = function () {
var self = this;
// Watch hashchange
window.onhashchange = function () {
self.process();
};
// Run on load
/*
* Copyright (c) 2014, Jay Oster
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
/**
* Component Constructor
*
* Used to provide a means for overriding default styles without redundant output
* Allows for the component to be package managed with a tool like bower
* without being tied to its predefined styles/settings for unit testing
*
* Sass v3.3.2 (Maptastic Maple)
* Compass (v1.0.0.alpha.19)
*
/*!
* $.preload() function for jQuery
* Preload images, CSS and JavaScript files without executing them
* Script by Stoyan Stefanov – http://www.phpied.com/preload-cssjavascript-without-execution/
* Slightly rewritten by Mathias Bynens – http://mathiasbynens.be/
* Demo: http://mathiasbynens.be/demo/javascript-preload
* Note that since this script relies on jQuery, the preloading process will not start until jQuery has finished loading.
*/
$.extend({
// Color names are not intended for direct use in your Sass files.
// Create a color map for each hue (e.g., neutrals, reds, yellows, greens and browns).
// http://www.color-blindness.com/color-name-hue/
$neutrals: (
gray: #7f7f7f
);
$blues: (
mariner: #4862a3,
// This code will only work if you use Sass 3.3 (or higher)
// Configuration :
// -----------------------------------------
$screensizes : (
'default' : 0 infinity,
'mobile' : 0 767px,
'phone' : 0 480px,
'tablet' : 481px 767px,