Skip to content

Instantly share code, notes, and snippets.

[
{
"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
[
{
"pack number": 0,
"pack name": "Comapny research combined",
"T1": 0,
"T2": null,
"T3": null,
"T4": null,
"T5": null,
"type": null,
@yonatanmn
yonatanmn / index.html
Last active May 5, 2018 23:31
click-delete table, vanila js, gradient bg, https://codepen.io/anon/pen/yjoXyY
<div id="container">
</div>
@yonatanmn
yonatanmn / 10-coins.js
Last active July 3, 2016 16:00
create combination of exactly 10 coins to achieve requested amount (available coins: 1,2,5,10)
"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++){
@yonatanmn
yonatanmn / numbersSquareV1.js
Last active June 29, 2016 13:01
create square of numbers - look at result file
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]
}
@yonatanmn
yonatanmn / Trie.js
Created April 18, 2016 16:20
Trie for autocomplete in JS
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];
@yonatanmn
yonatanmn / coolEmitter.js
Last active August 23, 2016 13:05
event emitter without 'on' and 'emit'
'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));
};
@yonatanmn
yonatanmn / sequence.js
Last active April 6, 2016 12:07
SEQUENCE function that will call PROMISE handlers when the promises RESOLVES in the sequence they were ordered ASAP.
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');
@yonatanmn
yonatanmn / Sprites Mixin For Sass (scss).markdown
Created July 6, 2015 17:58
Sprites Mixin For Sass (scss)

Sprites Mixin For Sass (scss)

Really conveninet mixin for using css sprites, no need to start messing with background position.

A Pen by yonatanmn on CodePen.

License.

@yonatanmn
yonatanmn / css sprite with sass (scss)
Last active July 17, 2017 15:14
css sprite with sass (scss)
//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