Skip to content

Instantly share code, notes, and snippets.

View MadRiver44's full-sized avatar

Kevin MadRiver44

View GitHub Profile
@MadRiver44
MadRiver44 / Creating a .json file from .yml
Created December 20, 2019 15:18
Create a .json file from reading backstop.yml file -- updateConfig.js
/**
* This script creates a `backstop.json` file from `backstop.yml` and all <label>.yml files included in scenarios directory
* `backstop.json` is a configuration file that BackstopJS uses to create screenshots of components
*
*/
const fs = require('fs')
const path = require('path')
const yaml = require('js-yaml')
@MadRiver44
MadRiver44 / multiFilter.js
Created February 21, 2019 02:53 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple criteria.
/**
* Filters an array of objects with multiple criteria.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria as the property names
* @return {Array}
*/
function multiFilter(array, filters) {
const filterKeys = Object.keys(filters);
// filters all elements passing the criteria
@MadRiver44
MadRiver44 / The Technical Interview Cheat Sheet.md
Created December 12, 2018 15:28 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@MadRiver44
MadRiver44 / table1.csv
Created July 12, 2018 21:05
medium table1
key value
b 2
outter reference to function inner
a 1
> [email protected] build /Users/kevinturney/Kanban
> NODE_ENV=production webpack -p --progress
Hash: 0a819a4c169dc448444f
Version: webpack 1.12.15
Time: 8225ms
Asset Size Chunks Chunk Names
bundle.js 365 kB 0 [emitted] main
+ 514 hidden modules
2017-12-12T13:32:31.712818+00:00 app[web.1]: at require (internal/module.js:11:18)
2017-12-12T13:32:31.712819+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:14:15)
2017-12-12T13:32:31.712820+00:00 app[web.1]: at Module._compile (module.js:635:30)
2017-12-12T13:32:31.724531+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-12-12T13:32:31.726257+00:00 app[web.1]: npm ERR! [email protected] start: `node ./bin/www`
2017-12-12T13:32:31.724873+00:00 app[web.1]: npm ERR! errno 1
2017-12-12T13:32:31.726369+00:00 app[web.1]: npm ERR! Exit status 1
2017-12-12T13:32:31.726569+00:00 app[web.1]: npm ERR!
2017-12-12T13:32:31.726706+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.
2017-12-12T13:32:31.726834+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@MadRiver44
MadRiver44 / react_webpack_images.md
Last active November 7, 2017 21:54
Adding images to react with webpack

Adding images to a React app with Webpack

Setup

  • npm install --save-dev file-loader
  • npm install --save-dev css-loader

Remember, loaders are transformations that are applied on the source code of the module. They allow you to pre-process files as you import or load them. Loaders similar to other build tools perform tasks and handle front end build steps. For this gist loaders allow the import of CSS files directly into javascript modules.

Web Typography 101

Objectives

  1. Go over how to convert, download, & host your own fonts
  2. Using CSS to make type easier to read
    • The concept of the font stack
    • Serif, sans-serif, cursive, fantasy, monospace
    • Letter-spacing
  • Large fonts in featured places
@MadRiver44
MadRiver44 / readme.md
Created May 26, 2017 14:28 — forked from jlr7245/readme.md
express auth stepbystep

Express Auth Step-by-Step

Setup

Install the necessary dependencies.

  • passport
  • passport-local
  • bcryptjs
  • cookie-parser
  • dotenv