Skip to content

Instantly share code, notes, and snippets.

Zac Collier zacacollier

Block or report user

Report or block zacacollier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zacacollier
zacacollier / get_repo_link.sh
Created Feb 8, 2019
print a link to a local git repository's origin (SSH only)
View get_repo_link.sh
View 2018-03-01React.md

React Day 2

syntactical differences

Modern JavaScript

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

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?
View init.vim
" -*- 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
View gist:ec6fae0acf8d00364d87d78607fe2bb2

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
View 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)

View markdownParser.js
/*
* 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 = {
View lookSay.js
"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
Interpolation Search
View jsbin.citeson.js
/*
* 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
View mergesort.js
'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;
You can’t perform that action at this time.