Skip to content

Instantly share code, notes, and snippets.

Kevin White kwhitejr

Block or report user

Report or block kwhitejr

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
@kwhitejr
kwhitejr / FirstName.js
Last active Oct 7, 2019
Complex Form with React Hooks
View FirstName.js
// Example component that utilizes FormContext
import React, { useContext } from "react";
import { FormContext } from "contexts.js";
export default function FirstNameInput() {
const { form, setForm } = useContext(FormContext);
const handleChange = key => event => {
setForm({ ...form, [key]: event.target.value });
};
@kwhitejr
kwhitejr / Login.js
Created May 12, 2019
A hideous but stateful React Class Component for AWS Amplify authorization
View Login.js
import React, { Component } from "react";
import { withRouter, Redirect } from "react-router-dom";
import { Authenticator } from "aws-amplify-react";
import { Auth, Logger, JS } from "aws-amplify";
import {
CustomSignIn,
CustomSignUp,
CustomConfirmSignIn,
CustomConfirmSignUp,
@kwhitejr
kwhitejr / aws_solutions_architect.cribsheet.md
Last active Jan 5, 2019
Crib Sheet for AWS Solutions Architect Exam
View aws_solutions_architect.cribsheet.md

Crib Sheet for AWS Solutions Architect Exam

Identity and Access Management (IAM)

Official Resources

Main Features

View 100 Days of Code - 1.3.2017.md
@kwhitejr
kwhitejr / cli-basics.md
Last active Dec 9, 2016
DevLeaguePrep -- Command Line Basics
View cli-basics.md

CLI Basics

Basic Commands

Let's read about a couple of the most common commands that you're going to use.

ls = "list directory"; lists all files and folders in the present working directory (where you currently are).

pwd = "present working directory"; tells you where you currently are!

cd foldername = "change directory"; switches to the directory named 'foldername'. 'foldername' is always a child of the pwd (present working directory).

@kwhitejr
kwhitejr / Kevin White - Resume.md
Last active Jan 5, 2017
Kevin's Living Resume
View Kevin White - Resume.md
@kwhitejr
kwhitejr / README.md
Last active Jan 19, 2016 — forked from thgaskell/README.md
Sequelize + Express Starter Guide
View README.md
@kwhitejr
kwhitejr / gulp-scss-livereload.md
Created Dec 20, 2015 — forked from kellishouts/gulp-scss-livereload.md
Gulp + SCSS + LiveReload - Updated 12/18/2015
View gulp-scss-livereload.md

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 / Ruh-Roh.md
Last active Dec 12, 2015 — forked from jaywon/Ruh-Roh.md
Email Hell
View Ruh-Roh.md

###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

View gist:ed74d21025e007a0ed22

###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.

You can’t perform that action at this time.