Skip to content

Instantly share code, notes, and snippets.

View eliortabeka's full-sized avatar

Elior Tabeka eliortabeka

View GitHub Profile
@eliortabeka
eliortabeka / counter.function.js
Created October 9, 2018 11:31 — forked from saintplay/counter.function.js
Add counter for Firestore Collection
// functions/income/counter.function.js
'use strict'
const functions = require('firebase-functions')
const admin = require('firebase-admin')
// Prevent firebase from initializing twice
try { admin.initializeApp(functions.config().firebase) } catch (e) {}
@eliortabeka
eliortabeka / crayola.json
Created January 24, 2017 23:38 — forked from jjdelc/crayola.json
Crayola colors in JSON format
[
{
"hex": "#EFDECD",
"name": "Almond",
"rgb": "(239, 222, 205)"
},
{
"hex": "#CD9575",
"name": "Antique Brass",
"rgb": "(205, 149, 117)"
@eliortabeka
eliortabeka / array_iteration_thoughts.md
Created January 24, 2017 23:18 — forked from ljharb/array_iteration_thoughts.md
Array iteration methods summarized

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and

@eliortabeka
eliortabeka / Button Hover Effect with box-shadow.markdown
Created June 17, 2015 13:45
Button Hover Effect with box-shadow
@eliortabeka
eliortabeka / Triangle-Loading-animation-using-clip-path.markdown
Created April 13, 2015 21:16
Triangle Loading animation using clip-path
@eliortabeka
eliortabeka / Circle-Loading-animation-using-clip-path.markdown
Last active August 29, 2015 14:19
Circle Loading animation using clip-path
@eliortabeka
eliortabeka / Square-Loading-animation-using-clip-path.markdown
Last active August 29, 2015 14:19
Square Loading animation using clip-path