Skip to content

Instantly share code, notes, and snippets.

View deenjohn's full-sized avatar

Deen John deenjohn

View GitHub Profile
@deenjohn
deenjohn / open-source-beginner.md
Last active September 18, 2015 17:30 — forked from nicknisi/open-source-beginner.md
A collection of JavaScript projects with issues labeled beginner-friendly
@deenjohn
deenjohn / latency.txt
Created July 30, 2016 21:28 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
package de.YonasCode.TheCore.MultiMap;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Set;
public class MultiMap<A, B, C> implements Cloneable, Iterable<A>, Serializable {
@deenjohn
deenjohn / unzip.sh
Created January 25, 2017 05:18 — forked from HennIdan/unzip.sh
function unzipAll()
{
for file in `ls | /bin/grep zip`; do
local base_name="${file%.*}"
rm -rf $base_name
mkdir $base_name
unzip $file -d $base_name
rm $file
done
}
@deenjohn
deenjohn / react-internals.md
Created April 5, 2017 19:12 — forked from nrn/react-internals.md
Notes for react internals discussion.

react internals discussion

React: a robust functional view layer.

View code and templating are combined as JavaScript.

In JavaScript you create a virtual DOM, react diffs changes between the last virtual DOM and the next, mutating the real DOM only as necessary to reflect the changes. This has huge implications for cognitive

@deenjohn
deenjohn / introrx.md
Created May 8, 2017 18:14 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@deenjohn
deenjohn / js-observables-binding.md
Created May 19, 2017 05:36 — forked from austinhyde/js-observables-binding.md
Vanilla JavaScript Data Binding

Observables

You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:

var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }

console.log(getN()); // 5

setN(10);

/*!
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010
* http://benalman.com/
*
* Original Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*
* Made awesome by Rick Waldron
*
@deenjohn
deenjohn / HEY-YOU.md
Created August 12, 2017 09:20 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@deenjohn
deenjohn / rxjs_operators_by_example.md
Created August 25, 2017 22:27 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example