Skip to content

Instantly share code, notes, and snippets.

View zacacollier's full-sized avatar

Zac Collier zacacollier

View GitHub Profile
@zacacollier
zacacollier / The Technical Interview Cheat Sheet.md
Created December 1, 2016 01:27 — 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.
@zacacollier
zacacollier / arch-linux-install
Created December 24, 2016 19:08 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
#app {
margin: 0 auto;
width: 13.37%;
'use strict';
var seq = [1, 4, 6, 3, 1, 4, 6, 3, 25, 593, 0, 53, 24, 352, 53905, 234];
function merge(array) {
if (array.length < 2) {
console.log('returns ' + array);
return array;
}
var mid = array.length / 2;
@zacacollier
zacacollier / jsbin.citeson.js
Created May 10, 2017 19:37
Interpolation Search
/*
* Performance Test at
* https://jsperf.com/interpolate-search/1
*/
"use strict";
function interpolateSearch(array, target) {
var high = array.length - 1;
var low = 0; // lowest possible index of an array is 0
"use strict";
function lookSay (number) {
/* Setup:
* Stringify the number, split it,
* then coerce each string to an integer
*/
let split = `${number}`.split("").map(n => +n);
let acc = {};
// '.reduce()' would be nice but it's not as efficient
/*
* Reusable Helpers (á la Professor Frisby):
* Note that in a real project, these would live in a separate file
* (e.g. `src/constants/helpers.js`)
*/
function split(string, onChar) {
return string.split(onChar);
}
/* Designate filtered stems for concatenating to the result */
const stems = {
@zacacollier
zacacollier / hotkeys.md
Last active June 5, 2017 15:58
hotkeys.md
  • Command - Tab / Command - Shift - Tab # Cycle active window forwards / backwards

  • Command - 1 / 2 / 3 ... 9 # select first tab, second tab third tab, or last tab (Chrome and Atom)

  • Command - R # Reload (Chrome)

  • Command - Space # Spotlight search (you should almost never have to use finder to open an application)

  • Command - S # Save (Atom, Word, almost any GUI application really)