Skip to content

Instantly share code, notes, and snippets.

View kwhitejr's full-sized avatar

Kevin White kwhitejr

  • Wayfair, Inc.
  • Portland, OR
View GitHub Profile
@kwhitejr
kwhitejr / gist:ed74d21025e007a0ed22
Created November 21, 2015 19:03 — forked from jaywon/gist:c76abc57dc33e1679c02
Circular String Brain Bender

###Good Morning Agents

Your challenge this morning is to create a function that implements an algorithm using the concepts we've covered this week.

###Challenge

  1. Write an algorithm that takes in 2 strings as parameters (source, find).
  2. Your function should return true if the string passed in as the find parameter is found in the source parameter if source were circular in nature. Meaning there is no end to the source string.
  3. Important: A match would be true if the word to find is partially at the end of the word and at the beginning in sequence.

Ex.

@kwhitejr
kwhitejr / Ruh-Roh.md
Last active December 12, 2015 21:38 — forked from jaywon/Ruh-Roh.md
Email Hell

###Email Hell

We just found out that there is a bug in production that our e-mail function was iterating errantly and sending duplicate e-mails to many users. We need to fix this quickly but we don't want to send out a mass apology letter to all of our users.

Our sysadmin gave us the SMTP logs and we need to process the logs and identify which users received multiple e-mails so that we can directly send them a follow up e-mail explaining the situation and offer super cool swag to keep them on as customers.

Also, the boss wants this done ASAP, we don't have time to do this manually...HAAALLLLPPP!

###The Fix

@kwhitejr
kwhitejr / gulp-scss-livereload.md
Created December 20, 2015 00:24 — forked from kellishouts/gulp-scss-livereload.md
Gulp + SCSS + LiveReload - Updated 12/18/2015

Gulp + SCSS + LiveReload

This Gist outlines the gulp workflow that will:

  1. watch for any scss changes, then compiles scss source into css
  2. watch for any changes in the public directory, and trigger live-reload
  3. serve static content in public/

This Gist also assumes you already know how to install npm modules, gitignore, create directories and create files via the command line.

@kwhitejr
kwhitejr / README.md
Last active January 19, 2016 00:41 — forked from thgaskell/README.md
Sequelize + Express Starter Guide