Skip to content

Instantly share code, notes, and snippets.

facultymatt / gist:f7f188f65b73856db168
Created May 11, 2015 19:02
module.exports = {
friendlyName: 'Update object by Id',
description: 'Update a salseforce object given Id and new values.',
extendedDescription: 'Requires authentication with username, password, and secret token.',
inputs: {
email: {
example: '',
description: 'Email address used to login to your salseforce account.',
facultymatt /
Last active March 18, 2024 05:39
openFrameworks Kinect & projector calibration

Kinect/ projector calibration and mapping:

Map Projections to moving objects in real time.

Uses the Kinect to track and locate objects. Might be overkill for this project since the table doesn't move. However might be cool to use in reverse to NOT project onto people who are interacting with the table:

Kinect projector calibration

Another example that might be overkill since the table is static.

facultymatt / server.js
Created November 8, 2013 21:51
Simple server
* Add express to package.json
* Keep the app.get('*') for nice sinlge page app support
var express = require("express"),
app = express(),
port = parseInt(process.env.PORT, 10) || 4567;


  • Make changes on develop. Commit and push to origin.
  • Swtich to master, pull and merge from orgin.
  • IMPORTANT: You'll need to commit the build files since the build process times out on Heroku and so you need to do it locally.
  • From your Master Branch, change your .Procfile to web: ./node_modules/.bin/grunt build optimize && node server/server
  • Run $ foreman start which will simulate building on Heroku.
  • You should now have a bunch of new files in your build folder. Commit those. DONT COMMIT THE PROCFILE!
  • Now, back to normal...
  • Wait! Make sure to test the app as building and minification often breaks stuff!
facultymatt / images.js
Created October 10, 2013 19:04
Example image controller
function ImagesController($scope, $routeParams, $location, Global) {
// get global settings
$ = Global;
// set filepicker key
// define our empty image object
$scope.newImage = {};
// A design pattern for a notifier module
var transport = null; // will store our connection to nodemailer
var actions = ['generate_quote', 'generate_application', 'submit_application']; // actions allowed to email
// There is no model
exports.initModel() {}
// There are no routes
exports.initRoutes() {}
facultymatt /
Last active December 23, 2015 06:19
Node Email / notifier Best Practices

Emailer / Notifier Best Practices

  • Supports any protocol, ideally by just setting a config option or function.
  • Supports sendgrid, which is a Heroku based app, making it super simple to get running on develop.
  • Won't fail, or catches errors, if any variables are missing.
  • Checks for development and testing environments, and prevents email send (console.log instead)
  • REUSABLE! The library itself, and maybe even the template, should be resuable across projects.

Good Looking Approaches

facultymatt / display.html
Created September 13, 2013 21:55
Directive to do a time ago with angular. Add "moment" : "latest" to your bower.json file.
<p>{{poast.created | fromNow}}</p>
facultymatt /
Last active April 16, 2024 09:31
Roles and permissions system for Nodejs
facultymatt /
Last active December 21, 2015 20:29
I just got a new MacBook Pro. Im starting from scratch - no automatic transferring of programs or files. I'm compiling this list of software that I install, in the relative order in which I install it.
  • Tower Git Client

  • Coda 2

  • Sublime 2

  • Webstorm

  • Espresso

  • NodeJS

  • Chrome

  • Chrome Livereload

  • Chrome Postman