Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="shortcut icon" href="/images/quicklistings/favicon.ico" type="image/x-icon">
<!-- CSS -->
@rexfordkelly
rexfordkelly / Fib functions - iterative.
Last active April 22, 2017 19:33
Examples of implementing iterative solutions for fib in js
**Fib Explored.**
The following is based on some notes i've made while working through fib toy problems with others.
```
/**
Simple iterative Fib sequence generator
@rexfordkelly
rexfordkelly / composables.php
Last active December 8, 2016 17:30
Composable Configs
// Example Usage:
$config = [
"three" => '{{app_path}}/index.php',
"app_version" => '0.0.1',
"app_root" => dirname(__DIR__),
"app_name" => 'stitch',
"app_path" => '{{app_root}}/{{app_name}}/{{app_version}}',
"echo" => function($scope, $key) {
echo $scope->{$key};
},
@rexfordkelly
rexfordkelly / NavTree
Created August 29, 2016 17:27
a simple NavTree Data Structure.
/**
A super simple tree structure to make building and
traversing navigation trees stupid simple.
*/
class NavTree {
constructor( label, children ){
this.children = children || []
This was hard.
var q = (function () {
return 'Array,Boolean,Date,Function,Null,Number,Object,RegExp,String,Undefined'.split(',').reduce( function( checker, type ){
checker['is' + type] = ( function (identity){
return function (context) {
return Object.prototype.toString.call(context).slice(8, -1) === identity;
};
})( type );
return checker;
}, {});
})();
@rexfordkelly
rexfordkelly / Steps
Created August 16, 2016 20:00
Simple process to setup Slack on another computer
# Slack
Slack is pretty cool, and it's begun to grow on me. One thing that kept me from
diving in head first, was the setup process. It seemed a little half baked. I
work on at least 4 different devices, and having to set it up from scratch
on each device seemed like too much work.
I could never remember all the team names, channels etc.
But due to the rest of my team and peers using Slack I finally decided to bite the
/**
Exercises:
Let's get familiar with working with Strings
in JavaScript.
*/
/**
Before we get started let's setup some data to play with.
*/