Skip to content

Instantly share code, notes, and snippets.

View masiamj's full-sized avatar
😆
I was more naive than I am now

Mitch Masia masiamj

😆
I was more naive than I am now
  • Chicago, IL
View GitHub Profile
@masiamj
masiamj / SearchBar.jsx
Created May 21, 2017 23:12
TalkRise SearchBar Reference Component
/**
* GENERAL NOTES
* @author TalkRise <admin@talkrise.com>
*/
// Module imports
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
@masiamj
masiamj / apiUtilities.jsx
Created June 6, 2017 18:02
Gist for Reusable API Utilities for GET, PATCH, POST, and DELETE calls.
/**
* GENERAL NOTES
* @author TalkRise <admin@talkrise.com>
*/
// Module imports
import axios from 'axios';
@masiamj
masiamj / withEnterTransition.js
Created May 10, 2018 14:29
A generic way to apply enter transitions to a component.
import React, { Component } from 'react'
import type { ComponentType } from 'react'
import { omit, prop } from 'ramda'
import posed from 'react-pose'
/**
* @const poseProps
* @description Represents a fade up transition
* @type {{hidden: {y: number, opacity: number}, visible: {y: number, opacity: number}}}
*/
@masiamj
masiamj / 4Mike.py
Last active May 21, 2018 17:18
Example Python code for Mike
import sys
import requests
"""Define Constants"""
MAILGUN_DOMAIN = ""
MAILGUN_API_KEY = ""
'''
Entry point for the application
'''
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import GenericErrorComponent from './GenericErrorComponent'
import GenericLoadingComponent from './GenericLoadingComponent'
class GraphQLDataWrapper extends Component {
render () {
const { data, error, ErrorComponent, loading, LoadingComponent, renderData, ...rest } = this.props
// There was an error
@masiamj
masiamj / configureFirebaseInstance.js
Created November 3, 2018 15:32
Configures a Firebase Instance
import * as firebase from 'firebase'
// Configure your firebase singleton instance
const firebaseInstance = firebase.initializeApp({
apiKey: YOUR_FIREBASE_API_KEY,
authDomain: YOUR_FIREBASE_AUTH_DOMAIN,
databaseURL: YOUR_FIREBASE_DATABASE_URL,
storageBucket: YOUR_FIREBASE_STORAGE_BUCKET
})
@masiamj
masiamj / index.js
Created November 15, 2018 23:00
Succinct Redux (Orders)
/**
* orders/index.js
*
* @desc The key to our succinct redux pattern is to keep our domain action types, reducer, actions, selectors, and data HOCs
* in the same file as these functions are inherently coupled
*/
/**
* @desc Imports
*/
@masiamj
masiamj / .zshrc
Last active June 3, 2019 01:31
GR Terminal Config
# 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/mmasia/.oh-my-zsh"
export PATH=~/Documents/repos/github.com/Guaranteed-Rate/kubeclj:$PATH
export PATH=~/.cargo/bin:$PATH
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@masiamj
masiamj / .vimrc
Last active May 30, 2019 20:20
GR Vim Config
set nocompatible " be iMproved, required
filetype off " required
syntax on
set rtp+=~/.vim/bundle/Vundle.vim
set noswapfile
set number
set noshowmode
call vundle#begin()
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a