Skip to content

Instantly share code, notes, and snippets.

View timesync's full-sized avatar
💭
Doing stuff.

Kurt Collins timesync

💭
Doing stuff.
View GitHub Profile
@timesync
timesync / .gitignore
Last active June 6, 2024 18:49
resume.json
.vercel
### Keybase proof
I hereby claim:
* I am timesync on github.
* I am timesync (https://keybase.io/timesync) on keybase.
* I have a public key ASCKMZs7AN4QYJ_7IYDn9MasiudrBwtw_4oFJw7F8qHPugo
To claim this, I am signing this object:
@timesync
timesync / JSONException.py
Created August 26, 2018 16:32
Flask JSON Error Handler
"""
This module creates an exception handler in Flask that spits out JSON
instead of HTML-based exceptions. This code was initially taken from:
https://coderwall.com/p/xq88zg/json-exception-handler-for-flask.
There are examples on that web page on how to instantiate it and
integrate it in to your code. I have made alterations in order to
ensure continued successful operation during redirects and such.
This codebase *requires* Flask.

I was recently asked by someone to give an example of how to read a csv file in their node.js application, and how to parse it to get it to be usable in their app. In fact what they wanted to do is very simple, and it is one of the many reasons I'm a big fan of Node.js, because not only can it do things like this in a few lines of JavaScript, it does it server side, and fast. So This article lays out step by step how to have node.js read and parse a CSV file stored in it's project, by using the CSV module.

Prerequisites:

  1. Have a node.js development environment. If you need a guide to set this up, you should look at the node documentation as it gives an easy tutorial to do so. If you're looking for a good tutorial, check this one out by the people at @codeship: The Absolute Beginner's Guide to Node.js
  2. A Text Editor. I currently use vsCode, Atom and Sublime interchangeably
@timesync
timesync / happy_git_on_osx.md
Last active April 2, 2018 19:38 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X 10.13.3 (Homebrew)

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@timesync
timesync / mongodb-atlas-acknowledge-alert.js
Last active December 30, 2016 18:37
MongoDB Atlas Actions for Built.io Flow
/**
* mongodb-atlas-acknowledge-alert.js
*
* @author Kurt Collins (twitter/github: @timesync)
*
* @platform Built.io Flow
*
* @description Acknowledge an alert.
*
* @input
@timesync
timesync / box-search.js
Created December 21, 2016 20:30
Box Search (A Built.io Activity to Perform Searches on Box.com)
/**
* sample-activity.js
*
* @author Sample Author
*
* @platform Built.io Flow
*
* @description Sample activity description.
*
* @input
@timesync
timesync / sample_activity.js
Created December 18, 2016 21:36
Activity Builder Sample Code
/**
* sample-activity.js
*
* @author Sample Author
*
* @platform Built.io Flow
*
* @description Sample activity description.
*
* @input
@timesync
timesync / freebusy-propose-meeting.js
Last active November 2, 2016 06:31
Propose a meeting time using the Freebusy Beta API
/**
* freebusy-propose-meeting.js
*
* @author Kurt Collins (twitter/github: @timesync)
* @author Parthiv Patel
*
* @platform Built.io Flow
*
* @description Node.js script to create an activity for proposing a meeting in Freebusy.io using
* Built.io Flow.
@timesync
timesync / salesforceiq-get-accounts.js
Last active September 16, 2016 08:23
Salesforce IQ Get Accounts (Built.io Flow Activity) This activity gets all accounts from SalesforceIQ
/**
* salesforceiq-get-accounts.js
*
* @author Kurt Collins (twitter/github: @timesync)
*
* @platform Built.io Flow
*
* @description Node.js script to create an activity for the SalesforceIQ Get Accounts call.
* This endpoint fetches all Accounts. Responses are paginated, max of 200 at a time.
*