Skip to content

Instantly share code, notes, and snippets.

View cozyazure's full-sized avatar

Joshua Foo Fang Hau cozyazure

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@cozyazure
cozyazure / introrx.md
Created July 3, 2017 14:54 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@cozyazure
cozyazure / reduction.js
Last active February 26, 2017 13:49
A bunch of call back functions to apply to a bunch of arrays
// Write a function that takes an array and an iterator function and applies
// the function to each element in that array
//
// Note: each does not have a return value, but rather simply runs the
// iterator function over each item in the input collection.
//
// Example:
// each([1,2,3], function(val) { console.log(val*val); }) // output 1, 4, 9
var each = (array, iterator) => {
@cozyazure
cozyazure / combinations.js
Created January 11, 2017 12:23 — forked from axelpale/combinations.js
JavaScript functions to calculate combinations of elements in Array.
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,