Skip to content

Instantly share code, notes, and snippets.

@mocheng
mocheng / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mocheng
mocheng / algorithm.php
Created February 17, 2011 06:44 — forked from ryanflorence/algorithm.php
Solution and forked from https://gist.github.com/830201
<?php
$arr = array(
'Color' => array('Red', 'Blue'),
'Size' => array('Regular', 'Large'),
'Material' => array('Metalic', 'Nylon')
);
function magic_algorithm($arr){
function cartesian_product($arrays) {