Skip to content

Instantly share code, notes, and snippets.

View jhs's full-sized avatar

Jason Smith jhs

  • McKinsey & Company
  • New York, NY
View GitHub Profile
@jhs
jhs / steps.md
Last active August 29, 2015 14:13
How to shoehorn io.js into nvm

NVM is nice. It sets up your $PATH for you, and it allows simple, isolated, stand-alone Node.js installs.

Until NVM officially supports [io.js][iojs], here is how to shoehorn io.js into your NVM system so that you can access it easily. The trick is just to tell nvm that you've installed "Node" version 1.0.1.

  1. Install NVM [the usual way][nvm-install]. Confirm that you are using v0.22.2: nvm --version # Output: 0.22.2
  2. Make sure it works by installing a Node.js version.
  3. Download io.js. I used the binary build for Linux. You could build your own too.
  4. Extract io.js anywhere: cd ~/Downloads; tar xzvf iojs-v1.0.1-linux-x64.tar.gz # (or wherever your download/build is)
  5. mkdir -p ~/.nvm/versions/node
  6. mv iojs-v1.0.1-linux-x64/ ~/.nvm/versions/node/v1.0.1 # (or whatever your download/build is)
@jhs
jhs / LICENSE.txt
Created September 9, 2015 02:44
Apple "Start Developing iOS Apps (Swift) license
Sample code project: FoodTracker
Version: 1.0
IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
redistribute this Apple software.
@jhs
jhs / interaction.txt
Created September 15, 2015 11:56
Committing to CouchDB Nano
jhs@book:~/src/couchdb-nano$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
jhs@book:~/src/couchdb-nano$ echo >> lib/nano.js
jhs@book:~/src/couchdb-nano$ git commit -a -m 'Add a blank line'
> [email protected] jshint /Users/jhs/src/couchdb-nano
> jshint tests/*/*/*.js lib/*.js
@jhs
jhs / app.js
Created June 15, 2016 07:28
How to use fun-pouchdb
var DB = require('fun-pouchdb').defaults({prefix: __dirname})
// Production app needs:
// 1. Validation functions
// 2. Cloudant credentials
// 3. Design documents
// Optional Cloudant credentials
var cloudant = {account:process.env.cloudant_account,
password:process.env.cloudant_password}