Skip to content

Instantly share code, notes, and snippets.

View MarkDucommun's full-sized avatar

Mark Ducommun MarkDucommun

  • VMware Tanzu Labs
  • Chicago
View GitHub Profile
@MarkDucommun
MarkDucommun / map-reduce.rb
Created November 26, 2017 22:11
map-reduce-ruby
def self.map_reduce(collection, options = {})
if options[:slices] && options[:slice_size]
fail 'Cannot set number of slices and slice size'
end
fail 'Must provide a block' unless block_given?
slices = options.fetch(:slices, 10)
slice_size = options.fetch(:slice_size) do
if collection.length < slices
1
else
0.2.0
@MarkDucommun
MarkDucommun / The Technical Interview Cheat Sheet.md
Last active August 25, 2015 19:44 — 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.
@MarkDucommun
MarkDucommun / form-validator.js
Last active December 21, 2015 03:49 — forked from ksolo/form-validator.js
Form Validation
$(function(){
$('button').click(function(event){
event.preventDefault();
var value = $('form').serializeArray();
console.log("stuff")
email = value[0].value
password = value[1].value
var errors = []
@MarkDucommun
MarkDucommun / carousel.js
Last active December 21, 2015 03:29 — forked from ksolo/carousel.js
Image Carousel
@MarkDucommun
MarkDucommun / zoo.js
Last active December 21, 2015 03:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
var Zoo = {}
Zoo.init = function(animals){
this.animals = animals
}
@MarkDucommun
MarkDucommun / index.html
Last active December 21, 2015 03:19 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.