Skip to content

Instantly share code, notes, and snippets.

View tsheaff's full-sized avatar

Tyler Sheaffer tsheaff

View GitHub Profile
models = require '../models'
sequelize = require 'sequelize'
async = require 'async'
_ = require 'lodash'
fs = require 'fs'
moment = require 'moment-timezone'
Intercom = require 'intercom-client'
IntercomClient = new Intercom.Client(process.env.INTERCOM_APP_ID, process.env.INTERCOM_API_KEY)
emails = fs.readFileSync('./scripts/unsubscribed_emails.txt').toString().split("\n")
LEFT A COMMENT AT THE TOP AND BOTTOM IN ALL CAPS
api tsheaff$ coffee scripts/import_intercom_users.coffee
1136822 users
submitted 100 to intercom
> intercom response is { app_id: 'oq4r3mkf',
id: 'job_a916803a_3a7c_11e6_bfad_6b1784c25fa6',
Tylers-MacBook-Pro:~ tsheaff$ curl https://api.intercom.io/jobs/job_a916803a_3a7c_11e6_bfad_6b1784c25fa6 -H Accept:application/json --user oq4r3mkf:cd1493c4a765f37aff7c51e59bdc5b8d65db44b6 | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 556 0 556 0 0 263 0 --:--:-- 0:00:02 --:--:-- 263
{
"app_id": "oq4r3mkf",
"closing_at": 1466822676,
"completed_at": 1466827578,
"created_at": 1466821776,
"id": "job_a916803a_3a7c_11e6_bfad_6b1784c25fa6",
import Foundation
import Intents
//
// INStartWorkoutIntentResponse.h
// Intents
//
// Copyright © 2016 Apple Inc. All rights reserved.
//
const _ = require('lodash');
const moment = require('moment');
const birthdays = [
'February 22', // Washington
'October 30', // Adams
'April 13', // Jefferson
'March 16', // Madison
'April 28th', // Monroe
'July 11', // Quincy Adams