Skip to content

Instantly share code, notes, and snippets.

View ChapmanSnowden's full-sized avatar

Chapman Snowden ChapmanSnowden

  • San Francisco, CA
View GitHub Profile

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.
  2. A Text Editor
  3. A CSV file to test
  4. That's it
@ChapmanSnowden
ChapmanSnowden / README.md
Last active November 9, 2017 19:55 — forked from leapjs/README.md
Documentation

For the Web

This is an introductory reference for interfacing with the Leap Motion from JavaScript.

The Leap's driver runs a WebSocket server that streams gesture data to the browser. This lets users run gesture-based web applications immediately without downloading or installing any software.

Quick Start

Here's a simple program to explore the hue/saturation colorspace with one hand.

<!DOCTYPE html>
<html>
<head>
<title>Do Now</title>
</head>
<body>
<h1>Password Generator</h1>
<p>Where do you want to go on vacation </p>
<input type="text" id="vacation_id" name ="vacation_name">
<p>What was the name of your first pet?</p>
<!DOCTYPE html>
<html>
<head>
<title>Do Now</title>
</head>
<body>
<h1>Password Generator</h1>
<p>Where do you want to go on vacation </p>
<input type="text" name ="vacation">
<p>What was the name of your first pet?</p>
<!DOCTYPE html>
<html>
<head>
<title>Do Now</title>
</head>
<body>
<h1>Password Generator</h1>
<p>Where do you want to go on vacation </p>
<input type="text" name ="vacation">
<p>What was the name of your first pet?</p>
<!DOCTYPE html>
<html>
<head>
<title>Do Now 5.1.0</title>
</head>
<body>
<button id = "magic">Click Here</button>
<button id = "appear">Click Here to make words appear</button>
<h1>Make this text hide</h1>
<button id = "newtext">Click here to say something else</button>
<!DOCTYPE html>
<html>
<head>
<title>Do Now 5.1.0</title>
</head>
<body>
<button id = "magic">Click Here</button>
<button id = "appear">Click Here to make words appear</button>
<h1>Make this text hide</h1>
<button id = "newtext">Click here to say something else</button>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div class="main_container">
<h1>My Favorite Sneakers</h1>
<p>I'm not a sneakerhead, but I love new sneakers. Here are some lists of sneakers that I would love to have.</p>
<div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>This is a picture of a dog</p>
<img src="http://www.desktopwallpaperhd.net/wallpapers/2/6/wallpapers-doggy-funny-backgrounds-desktop-dog-27142.jpg">
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>