Skip to content

Instantly share code, notes, and snippets.

View zachdunn's full-sized avatar

Zach Dunn zachdunn

View GitHub Profile
@zachdunn
zachdunn / time-utils.js
Created April 15, 2016 15:29
Utils for working with timestamps
import moment from 'moment';
import _ from 'lodash';
/**
* Transform given timestamp properties into moment objects
* Example usage:
* myEvent = transformTimestamps(myEvent, ['started_at', 'confirmation.confirmed_at'])
* @param {Object} targetObject Object to transform properties for
* @param {Array} targetKeys Array of paths to timestamp property
* @return {Object} Transformed targetObject
@zachdunn
zachdunn / add-invitees.json
Created April 25, 2016 22:58
Robin API: Event Example
{
"title": "Core Competency Synergies",
"started_at": "2014-11-01T00:23:45Z",
"ended_at": "2014-11-01T01:23:45Z",
"invitees": [
{
"email": "[email protected]",
"display_name": "Attendee 1",
},
{
@zachdunn
zachdunn / papa-parse-angular-alias.js
Last active June 12, 2016 19:50
Promisify Papa Parse for Angular
(function () {
'use strict';
// Papa Parse: http://papaparse.com/
// Allows Angular apps to neatly inject `Papa` in components.
angular.module('appName').constant('Papa', window.Papa);
}).call(this);
@zachdunn
zachdunn / .zshrc
Last active December 3, 2018 12:59
Theme for oh my zsh
# ... (Find this section in your local .zshrc to replace)
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git osx terminalapp zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# ...