Skip to content

Instantly share code, notes, and snippets.

View liorama's full-sized avatar

Lior liorama

  • Tel Aviv
View GitHub Profile
liorama / mock_html_offer.html
Created February 13, 2018 00:04
Mock html poll
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
.item {
display: block;
liorama / cbWrapper.js
Created July 20, 2017 14:55
WrapCb will wrap all callbacks counting them and calling finalCb when all CB's were called
var cbCounter = 0
function finalCb(){
// Do something when all CBs are called
function wrapCb(cb, context){
return function(){ // context is optional, if you need to have the `this` changed for the CB
cb && || this); // so CB isn't mandatory