Skip to content

Instantly share code, notes, and snippets.

View matthamil's full-sized avatar
🐈

Matt Hamil matthamil

🐈
View GitHub Profile
@matthamil
matthamil / The Technical Interview Cheat Sheet.md
Created September 30, 2015 23:05 — 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.
// Question Module
// Modules inheriting from Question:
// Likert, YesNo, Gender, Age
var Question = function(question, type, answerChoices){
var text = question || '';
var questionType = type || '';
var answers = answerChoices || [];
@matthamil
matthamil / promises.js
Created December 15, 2015 07:03 — forked from danthareja/promises.js
A conjurer's guide to promises
/*
* A quick example of how to use Bluebird and Q to conjure your own promises
*
* Everything going on here is explained further in the following video:
* http://youtu.be/OU7WuVGSuZw?list=PLT-DLWOBKbB4dZ83I_7Ca-sUTvorckG-E
*
*/
// Import node modules
var Q = require('q');
@matthamil
matthamil / breadthfirstsearch.py
Last active March 7, 2016 04:24
Python implementation of breadth-first search
class SearchNode:
def __init__(self, action, state, parent):
self.state = state
self.action = action
self.parent = parent
def path(self):
if self.parent == None:
return [(self.action, self.state)]
else:
return self.parent.path() + [(self.action, self.state)]
module.exports = function(grunt) {
grunt.initConfig({
browserify: {
'../dist/app.js': ['../js/quiz.js']
},
jshint: {
options: {
predef: [ "document", "console" ],
esnext: true,
{
"name": "template",
"version": "1.0.0",
"description": "boilerplate repo for new projects",
"main": "index.js",
"scripts": {
"deploy": "gh-pages -d src",
"start": "http-server src",
"test": "open http://localhost:8080/bower_components/test.html"
},
#!/bin/bash
echo ==== Boilerplate Generator 1.0 ====
wget https://github.com/matthamil/frontend-boilerplate/archive/master.zip
echo * Unzipping
unzip master.zip
rm master.zip
mv frontend-boilerplate-master/* .
mv frontend-boilerplate-master/.* .
rm -rf frontend-boilerplate-master/
bower install
'use strict';
const gulp = require('gulp');
const sass = require('gulp-sass');
gulp.task('sass', () => {
return gulp.src('./src/sass/quiz.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./src/compiled-css'));
});
#!/bin/bash
printf "🤔 Repo Name: "
read name
printf "✏️ $name Description: "
read description
printf "✨ Creating repo: $name\n"
curl -u matthamil https://api.github.com/user/repos -d '{ "name": "'"$name"'",
"description": "'"$description"'" }'
git init
touch .gitignore
# Path to your oh-my-zsh installation.
export ZSH=/Users/matthamil/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.