Really conveninet mixin for using css sprites, no need to start messing with background position.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"site name": "Crunchbase", | |
"url": "Crunchbase.com", | |
"search url": "https://www.crunchbase.com/organization/999magic999", | |
"pack number": 0, | |
"Multiwords sign": null, | |
"case sens": null, | |
"Inpack order": 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"pack number": 0, | |
"pack name": "Comapny research combined", | |
"T1": 0, | |
"T2": null, | |
"T3": null, | |
"T4": null, | |
"T5": null, | |
"type": null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
function calc(s10, s5, s2, s1){ | |
return s10*10 + s5*5 + s2*2 + s1 | |
} | |
const resDict = {}; | |
function prepareResults() { | |
for(let s10=0;s10<=10;s10++){ | |
for(let s5=0;s5<=10;s5++){ | |
for(let s2=0;s2<=10;s2++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addBeforeAfter(arr, item){ | |
return [item].concat(arr).concat([item]) | |
} | |
function createLine(counter, min){ | |
const minNum = Math.max(counter, min); | |
return counter > 1 ? addBeforeAfter(createLine(counter - 1, min), minNum) : [minNum] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wordToLtrsArr(w){return w.split('')} | |
function tail(arr){return arr.slice(1)} | |
function goTo(o,wp){ | |
if(!wp.length){return o} | |
var firstLetter = wp[0]; | |
var point = o[firstLetter]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function emitize(obj, eventName) { | |
var _subscriptions = new Set(); | |
Object.defineProperty(obj, eventName, { | |
set(func) { _subscriptions.add(func); }, | |
get() { | |
var emit = (...args)=>{ | |
_subscriptions.forEach(f=>f(...args)); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randP = (name)=>{ | |
return new Promise((rs,rj) => { | |
let randTime = (Math.floor(Math.random() * 6) + 1) * 500; //500 to 3000 | |
setTimeout(rs, randTime, name + ' ' + randTime); | |
}); | |
}; | |
var log = function(x){console.log(x)}; | |
function thenLog(p){return p.then(log);} | |
var a = randP('1'); var b = randP('2'); var c = randP('3'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//usage is pretty simple: | |
//1. create a sprite of square images (if the icon is not square, save it inside a square anyway): | |
// example: http://glue.readthedocs.org/en/latest/_images/famfamfam2.png | |
//2. define sass map with the keys specified: | |
$mySprite:( | |
url: '../images/mySprite.png', | |
names: ('createIcon','player','bell','notifications','icon13','icon15'...), //names of all of the icons in sprite | |
itemsInRow: 10, //sprite structure |
NewerOlder