- Yellow text: #fde46e
Orange
var express = require('express'); | |
var sys = require('util'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY']; | |
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET']; | |
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", process.env['TWITTER_CONSUMER_KEY'], process.env['TWITTER_CONSUMER_SECRET']); |
phantom stdout: TypeError: 'null' is not an object (evaluating 'document.getElementById("CheckList")') | |
phantom stdout: http://www.hoerner.ca/:619 in CheckListPDF | |
http://www.hoerner.ca/:622 | |
Site: http://www.hoerner.ca | |
Start Time: Mon Sep 24 2012 23:17:19 GMT-0400 (EDT) | |
End Time: Mon Sep 24 2012 23:17:25 GMT-0400 (EDT) | |
Duration: 6.222s. |
Pipeline = ( objects )-> | |
unless @ instanceof Pipeline then return new Pipeline( objects ) | |
events.EventEmitter.call pipe = @ | |
unless objects instanceof Array then objects = [ objects ] | |
pipe.objects = objects | |
pipe.filter = ( filters, callback )-> | |
if typeof filters is 'function' | |
callback = filters | |
filters = null | |
pipe.metas = [] |
// constructor | |
var MyClass = function( instanceOptions ){ | |
// Make sure we're a new object (can be used without "new" constructor ie: new MyClass({}) === MyClass({}) ) | |
if( !(this instanceof MyClass) ) return new MyClass( instanceOptions ); | |
var myPrivateVar = "This variable cannot be accessed outside my any means whatsoever."; | |
this.myPublicVar = "This variable can be read and modified by anyone"; | |
var self = this; // use this for references to "this" within callbacks and stuff. | |
// you can write accessors for you private vars if you need. | |
this.myPrivateVarAccessor = function(){ return myPrivateVar } | |
// Gotcha! If it's an object or array of objects it/they can be modified!!! |
{ | |
"1": { | |
"labels": { | |
"de": "Factual Orte", | |
"es": "Lugares Factual", | |
"en": "Factual Places", | |
"fr": "Endroits de Factual", | |
"it": "Luoghi Factual", | |
"jp": "Factual 場所", | |
"kr": "Factual 장소", |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, stylus = require('stylus'); | |
var app = express.createServer(); | |
// This must be BEFORE other app.use |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>My Web Page</title> | |
<meta charset="utf-8"> | |
<link href="/stylesheets/main.css" rel="stylesheet"> | |
</head> | |
<body> | |
</body> | |
</html> |
/* Following canvas-based Perlin generation code originates from | |
* iron_wallaby's code at: http://www.ozoneasylum.com/30982 | |
*/ | |
function randomNoise(canvas, x, y, width, height, alpha) { | |
x = x || 0; | |
y = y || 0; | |
width = width || canvas.width; | |
height = height || canvas.height; | |
alpha = alpha || 255; | |
var g = canvas.getContext("2d"), |
@full:960; | |
@half:480; | |
@third:320; | |
@fourth:240; | |
@eighth:120; |