Skip to content

Instantly share code, notes, and snippets.

View chrisdamba's full-sized avatar

Christopher Dambamuromo chrisdamba

View GitHub Profile
const isLoggedIn = (context, event) => context.isAuthenticated
const canChooseDate = (context, event) => context.lessonType && context.subject
const canConfirm = (context, event) => context.date && context.subject
const scheduleMachine = Machine(
{
id: 'schedule',
initial: 'start',
context: {
isAuthenticated: true,

Keybase proof

I hereby claim:

  • I am chrisdamba on github.
  • I am christopherda (https://keybase.io/christopherda) on keybase.
  • I have a public key ASDNXglfLuVao3fvuHUzQj9QNnMuWXb2Cls0U-jryg542Ao

To claim this, I am signing this object:

@chrisdamba
chrisdamba / rxjs_operators_by_example.md
Created January 5, 2018 22:25 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@chrisdamba
chrisdamba / .block
Created April 2, 2017 13:27
Horserace tool
license: mit
@chrisdamba
chrisdamba / The Technical Interview Cheat Sheet.md
Created November 10, 2016 10:47 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
map = function() {
if (!this.feedback) return;
var obj = {};
obj[this.feedback] = 1;
emit(this.model, obj);
};
reduce = function(key, values) {
var counts = {};
values.forEach(function(v) {
@chrisdamba
chrisdamba / Apriori.py
Created August 30, 2016 06:39 — forked from marcelcaraciolo/Apriori.py
Apriori.py
#-*- coding:utf-8 - *-
def load_dataset():
"Load the sample dataset."
return [[1, 3, 4], [2, 3, 5], [1, 2, 3, 5], [2, 5]]
def createC1(dataset):
"Create a list of candidate item sets of size one."
@chrisdamba
chrisdamba / app_steps.js
Created August 4, 2016 14:34 — forked from mxriverlynn/app_steps.js
A backbone / marionette state machine for wizard / workflow
MyApp.module('MyApp.SomeBuilder', function(SomeBuilder, App, Backbone, Marionette, $, _){
'use strict';
// Controller
// ----------
SomeBuilder.Controller = Marionette.Controller.extend({
initialize: function(options){
this.navbarRegion = options.navbarRegion;
this.mainRegion = options.mainRegion;
{
"_id" : ObjectId("5756e3e0f32d0541149c6d6d"),
"host" : "www.mywebsite.com",
"ip" : "0.0.0.0",
"user_agents" : [
{
"sha1": "dcc0ed6139b2c38f189c9e3c978c675bf4d5ad09", // sha1 of the user agent
"user_agent" : "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0",
"created_at" : ISODate("2016-06-07T15:10:26.000Z"),
"updated_at" : ISODate("2016-06-20T12:38:53.000Z")
@chrisdamba
chrisdamba / .block
Last active May 31, 2016 12:05
Visualizing Global and Hemispheric Annual Mean Temperature Anomalies
license: gpl-3.0