Skip to content

Instantly share code, notes, and snippets.

View cooperka's full-sized avatar

Kevin C cooperka

View GitHub Profile
@cooperka
cooperka / __mocks__\react-redux.js
Last active March 22, 2018 02:42
Jest helper for Redux component testing
const mockDispatch = () => {};
function mapEverything(mapStateToProps, mapDispatchToProps, mergeProps, state, ownProps) {
const stateProps = mapStateToProps
? mapStateToProps(state, ownProps)
: {};
const dispatchProps = mapDispatchToProps
? mapDispatchToProps(mockDispatch, ownProps)
: {
@cooperka
cooperka / 01_install_yarn.config
Created June 18, 2018 23:50
AWS Elastic Beanstalk - Replace npm with yarn
# .ebextensions/01_install_yarn.config
files:
'/opt/elasticbeanstalk/hooks/appdeploy/pre/49install_yarn.sh' :
mode: '000755'
owner: root
group: root
content: |
#!/usr/bin/env bash
set -euxo pipefail
@cooperka
cooperka / Redux vs MobX comparison.md
Last active June 5, 2020 23:13
Redux vs MobX comparison

Redux

// Action type.
const ADD_TODO = 'ADD_TODO';

// Action creator.
function addTodo(todo) {
  return { type: ADD_TODO, todo };
}
@cooperka
cooperka / Redux (vanilla) vs Redux (hooks-for-redux) comparison.md
Last active June 6, 2020 00:06
Redux (vanilla) vs Redux (hooks-for-redux) comparison

Vanilla Redux

Learn more

// Action type.
const ADD_TODO = 'ADD_TODO';

// Action creator.
function addTodo(todo) {
@cooperka
cooperka / fhir-uscdi-tutorial.md
Last active February 16, 2024 18:47
Auto-select all FHIR APIs listed within the USCDI core data set

Auto-select all FHIR APIs listed within the USCDI core data set

Automatic Client ID Distribution for USCDI depends on you selecting a limited subset of FHIR resources, but it's painful to manually cross-reference to select exactly which ones (Epic documentation is here with the full list). Automated solution:

  1. Create a new app at https://fhir.epic.com/Developer/Apps

  2. On the edit page, deselect any selected APIs, and run in browser console:

$("#WebServicesChosen option[data-uscdi-readonly=True]").each((i, item) => {