Skip to content

Instantly share code, notes, and snippets.

View zacacollier's full-sized avatar

Zac Collier zacacollier

View GitHub Profile
@zacacollier
zacacollier / get_repo_link.sh
Created February 8, 2019 23:03
print a link to a local git repository's origin (SSH only)

React Day 2

syntactical differences

Modern JavaScript

  • let & const - prefer const
  • Arrow functions > function
// gross
function greet(greeting) {
  return greeting

Example Itinerary:

General Questions:
  • What have interviews been like?
  • What questions have you been asked?
    • "what's a closure? And when would you use one?"
    • "you're working on a project and you and another developer have a disagreement about how to resolve a certain problem. How do you deal with that?"
  • What questions should you ask your interviewer?
" -*- mode: vimrc -*-
"vim: ft=vim
" dotspaceneovim/auto-install {{{
"Automatic installation of spaceneovim.
if has('nvim')
let s:config_dir = $HOME . '/.config/nvim'
else
let s:config_dir = $HOME . '/.vim'
endif
@zacacollier
zacacollier / gist:ec6fae0acf8d00364d87d78607fe2bb2
Last active June 23, 2017 00:52
Intermediate Last Day Notes

Intermediate Q2 Last Day Notes

Now that you've learned JavaScript, it's time to learn ....
more JavaScript
  • Watch Javascript: Understanding the Weird Parts (you can always find it for like $10, use the Honey extension for Chrome)
  • Watch the YouTube channel funfunfunction
  • Learn about l33t features like async / await, Promises, Higher-Order Functions & "Composition over Inheritance"
Programming Fundamentals
@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)

/*
* 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 = {
"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
@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';
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;