Skip to content

Instantly share code, notes, and snippets.

View stoyanvi's full-sized avatar

Stoyan Ivanov stoyanvi

  • Sofia, Bulgaria
View GitHub Profile
@stoyanvi
stoyanvi / SassMeister-input.scss
Created April 8, 2014 14:19
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Here is a map containing all placeholders
// (Follow-up from: http://hugogiraudel.com/2014/03/31/getting-the-most-out-of-sass-placeholders/)
// ---
// - The key is the placeholder's name
// - The value is a map of declarations for the placeholder's content
@stoyanvi
stoyanvi / 0_reuse_code.js
Created April 4, 2014 11:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/*
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: 18,
tileSize: 256,
// 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,
// 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,
/*!
* $.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({
/**
* 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)
*
/*
* 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,
// Router object
var Router = function () {
var self = this;
// Watch hashchange
window.onhashchange = function () {
self.process();
};
// Run on load
var SimpleHashTable = function(hashCode) {
var table = [];
var Constructor = function() { };
Constructor.prototype.add = function(opts) {
};
return new Constructor();
}
module.exports.SimpleHashTable = SimpleHashTable;