Skip to content

Instantly share code, notes, and snippets.

View ColinFendrick's full-sized avatar

Colin Fendrick ColinFendrick

View GitHub Profile
(async () => {
const waitFor = (ms) => new Promise(r => setTimeout(r, ms));
const array = [1, 2, 3];
const obj = {a: 1, b: 2, c: 3};
for (let index = 0; index < array.length; index++) { // passes
await waitFor(50);
console.log('for-let:', array[index]);
}
console.log('for-let done ---PASSES---');

Using cypress and rtl

  • Integration and Unit testing

Step 1: ticket

  • Label your JIRA ticket
  • Either harmonycypress and/or harmonyunit
@ColinFendrick
ColinFendrick / .zshrc
Last active July 3, 2019 16:40
zshell stuff
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/cfendrick/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# ZSH_THEME="bureau"
const unhash = num => {
let charpos = []
let word = []
let dictionary = 'acdfgilmnoprstuw'
for (i = 10; i > 0; i--) {
charpos[i] = (num % 23)
num = (num - charpos[i]) / 23
word[i - 1] = dictionary.charAt(charpos[i])
}
const flatten = (arr) => {
  return arr.reduce((flattenedArray, toFlatten) => {
    return flattenedArray.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten)
  }, []);
};
@ColinFendrick
ColinFendrick / madmobile-coverletter.md
Last active May 16, 2017 13:13
MadMobile Cover Letter

MadMobile Cover Letter

Technology forms the basis of material improvement in our lives. From the printing press to the transistor, aqueduct to fission reactor, the improvements in technology allow goods and services to be faster and more affordable. I believe in early-adoption and bleeding-edge implementation of technologies to further the quality of life improvements technology has afforded us. My passion is small, disruptive, and collaborative workspaces and projects that streamline the consumer-supplier relationship and minimize friction and deadweight loss.

I studied Economics in college, alongside Math, and realized that technology is the fuel for the engine of wealth generation and life improvement in the individual. There I learned to think logically and algorithmically, as well as to solve problems in a

@ColinFendrick
ColinFendrick / Resume.md
Last active October 3, 2019 18:36
Resume
@ColinFendrick
ColinFendrick / nextBigger.js
Last active April 13, 2017 12:47
5 and 6 Kyu solutions
const nextBigger = (n) => {
d = (''+n).split('')
let pivot
let numArray
let min = 10
let place
for (let i = d.length - 2; i >= 0; i--) {
if (d[i] < d[i + 1]) {
numArray = d.slice(i + 1)
pivot = d[i]

Code to Perdition

I grew up with math. Specifically, I grew up with logic. I was on the math team in high school, spent my free time learning set theory and logic, and majored in Math with a focus on set theory in college. I still bristle when people use ‘inverse’ when they mean ‘converse’, but that’s mostly because I’m also an ass.

What excites me most about Javascript is being able to develop in a language that is logically and syntactically similar to modal logic. I am at home in conditional statements and JavaScript follows the same functional logic.

The praxis of Javascript, and the reorientation of my thinking into conditional statements, also, I believe, will help me think about programming going forward. I want to understand the reasons and logic behind programs, and gaining new insights into specific structures of programs is exciting.

The portfolio customization option enervated me: the practical application of seeing a new webpage form - actualizing a finished product - bores me. Learning