with heroku toolbelt installed run following in code directory (via Terminal)
npm install
git init
git add .
git commit -am "initial commit"
foreman start
<!doctype html> | |
<html> | |
<body> | |
<h1 class="page-header"> | |
Cab.ly | |
</h1> | |
<h2> | |
Driver Information | |
</h2> |
var express = require('express'); | |
var ejs = require('ejs'); //embedded javascript template engine | |
var app = express.createServer(express.logger()); | |
var mongoose = require('mongoose'); // include Mongoose MongoDB library | |
var schema = mongoose.Schema; | |
var requestURL = require('request'); | |
//include passport-foursquare | |
var passport = require('passport') | |
, util = require('util') |
var doSomethingForClient = function() { | |
// do something here | |
trackTime(); | |
} | |
var trackTime = function() { | |
console.log("tracking my time!"); | |
trackTime(); | |
} |
<!-- Loop through each state, 's' is the incrementer value --> | |
<% for(s=0;s< states.length; s++) %> | |
<h4><%=states[s].toUpperCase()%></h4> | |
<UL> | |
<!-- Loop through allLegs for the current state, state[s] --> | |
<% for(i=0; i<allLegs[states[s]].length; i++) {%> | |
<li><%= allLegs[states[s]][i].title %></li> |
/* Simple USB Keyboard Example | |
Teensy becomes a USB keyboard and types characters | |
REQUIREMENTS - Install the Teensyduino (arduino ide plugins) | |
http://www.pjrc.com/teensy/td_download.html | |
Before programming you must select Keyboard from the "Tools > USB Type" menu | |
This example code is in the public domain. | |
*/ |
/* | |
Keyboard Button test | |
Sends a text string when a button is pressed. | |
The circuit: | |
* pushbutton attached from pin 2 to +5V | |
* 10-kilohm resistor attached from pin 4 to ground | |
created 24 Oct 2011 |
Installing Python 2.7.x | |
https://gist.github.com/3603162 | |
*********************************************** | |
Installing Python Setuptools | |
1) Download Python Setuptools | |
http://pypi.python.org/pypi/setuptools#downloads |
# a string | |
name = "John Young" | |
occupation = "Astronaut" | |
# an integer | |
age = 81 | |
# float | |
days_in_space = 34.806 |
# create a dictionary | |
# mydict = { key1:value1, key2:value2 } | |
mission_dates = { | |
'Gemini 3' : '23 March 1965', | |
'Gemini 10' : '18-21 July 1966', | |
'Apollo 10' : '18-26 May 1969', | |
'Apollo 16' : '16-27 April 1972 ', | |
'STS-1' : '12-14 April 1981', | |
'STS-9' : '28 November - 6 December 1983' | |
} |