Skip to content

Instantly share code, notes, and snippets.

@Kphillycat
Kphillycat / post-merge
Created June 1, 2020 20:47
Git Hook for npm installs
if git diff-tree --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet 'package.json'; then
echo "$(date): Running npm install because package.json changed"
npm install > /dev/null
else
echo "$(date): No changes in package.json found"
fi
# ln -fv ./post-merge .git/hooks/
@Kphillycat
Kphillycat / README-Template.md
Created April 14, 2020 20:39 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Keybase proof

I hereby claim:

  • I am kphilycat on github.
  • I am kphillycat (https://keybase.io/kphillycat) on keybase.
  • I have a public key ASAfgajoED7YMRtVPkj20io74vkNBVDZGiOkdTC7cQUk_wo

To claim this, I am signing this object:

@Kphillycat
Kphillycat / async.willmount.test.js
Created September 5, 2018 11:04 — forked from AndrewRayCode/async.willmount.test.js
Jest / sinon async componentWillMount test utility function
import { spy } from 'sinon';
import { shallow } from 'enzyme';
// Utility method to asynchronously wait for component's willMount function to
// complete. Requires the componentWillMount method *returns* its async promise
// to wait for
export const willMount = async unmountedComponent => {
// Spy on the willmount method
const lifecycleMethod = spy(unmountedComponent.type.prototype, 'componentWillMount');
const wrapper = shallow(unmountedComponent);
@Kphillycat
Kphillycat / The Technical Interview Cheat Sheet.md
Last active August 27, 2015 10:52 — 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.