Skip to content

Instantly share code, notes, and snippets.

View chranderson's full-sized avatar
👋

Chris Anderson chranderson

👋
  • Denver, Colorado
View GitHub Profile
@chranderson
chranderson / pull_request_template.md
Last active July 26, 2024 20:08
Pull Request Template with checklist

Description and Context

Type of Change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
@chranderson
chranderson / ts-patterns.ts
Last active July 26, 2024 20:10
Helpful Typescript Patterns
/** TS inference helper
* Wrap an interface in Prettify to give you all of the properites you expect by hovering.
* Use to debug really complicated inheritance based inference
*/
export type Prettify<T> = {
[K in keyof T]: T[K]
} & {}
----------------------
@chranderson
chranderson / createFavicon.txt
Created September 5, 2018 19:46
multi-size favicon generator
install imagemagick (node)
https://www.npmjs.com/package/imagemagick
- npm -g install imagemagick
- brew install imagemagick
// in directory that contains favicon.png, run bash command:
convert favicon.png -alpha on -resize 256x256 \
-define icon:auto-resize="256,128,96,64,48,32,16" \
favicon.ico
@chranderson
chranderson / remove-git-tag.sh
Created November 7, 2017 20:06
Remove git tag
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@chranderson
chranderson / nvmCommands.js
Last active September 18, 2024 10:58
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
import React, { Component, PropTypes } from 'react';
import {reduxForm} from 'redux-form';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as dataMapActions from 'redux/modules/dataMap';
import {updateFieldMap} from 'redux/modules/dataMap';
@connect(
state => ({
fieldMap: state.dataMap.fieldMap,