This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, restaurant = require('./routes/restaurant') | |
, http = require('http') | |
, config = require('./config') | |
, stylus = require('stylus'); | |
var app = express(); | |
require('./db'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function pgControlWrapper (definition) { | |
// Got the cross-platform browser code from here: | |
// http://stackoverflow.com/questions/6665779/best-practices-for-cross-commonjs-browser-development?rq=1 | |
// This file will function properly as a <script> tag, or a module | |
// using CommonJS and NodeJS or RequireJS module formats. In | |
// Common/Node/RequireJS, the module exports the PressGang REST API and when | |
// executed as a simple <script>, it creates a PressGangCCMS global instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var compress = function (buf, cb) { | |
console.log('before ' + buf); | |
zlib.gzip(buf, function (err, result) { | |
buf = result; | |
console.log('in buf ' + buf); | |
console.log('in string ' + buf.toString()); | |
cb(buf) | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attributes = meteor.Collection('attributes'); | |
objects = meteor.Collection('objects'); | |
// Local Collection only - no such Collection server-side | |
mergedView = meteor.Collection('merged'); | |
allObjects = objects.find({}); | |
for (myObject=0; myObject<allObjects.count) | |
{ | |
myMergedView = mergedView.new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file IS NOT part of DocBook V5.0 | |
# | |
# ====================================================================== | |
namespace rng = "http://relaxng.org/ns/structure/1.0" | |
namespace s = "http://purl.oclc.org/dsdl/schematron" | |
namespace db = "http://docbook.org/ns/docbook" | |
default namespace = "http://docbook.org/ns/docbook" | |
include "../../schemas/docbook/docbook.rnc" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Stream = require('stream'); | |
var stream1 = new Stream; | |
stream1.readable = true; | |
var stream2 = new Stream; | |
stream2.readable = stream2.writable = true; | |
var stream3 = new Stream; | |
stream3.readable = stream3.writeable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jaws module create test test | |
JAWS: Successfully created test/test | |
sitapati@MacBook-Air [~/workspace/BGL-JAWS/jaws-bgl/aws_modules] $ rm -rf test | |
sitapati@MacBook-Air [~/workspace/BGL-JAWS/jaws-bgl/aws_modules] $ jaws module create -l test test | |
Unsupported cmd test. Must be install|update|create | |
$ jaws module -l create test test | |
/Users/sitapati/workspace/JAWS-Framework/JAWS/bin/jaws:155 | |
throw new JawsError('Specify options after cmd', JawsError.errorCodes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sitapati@MacBook-Air [~/workspace/BGL-JAWS/jaws-bgl/aws_modules] $ jaws | |
jaws | |
Commands: | |
create Create a new JAWS resource.: lambda, endpoint, project, region, stage | |
dash Experience the thrill of interactively deploying resources from the cutting-edge JAWS command center. | |
deploy Deploy resources to AWS.: lambda, endpoint, resources | |
env Manage environment variables.: list, get, set, unset | |
postinstall Run the post-install automation for an aws-module installed via a package manager. Example: jaws postinstall awsm-users --package-manager npm | |
run Run an AWSM Lambda locally |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sitapati@MacBook-Air [~/workspace/BGL-JAWS/jaws-bgl/aws_modules] $ jaws help create | |
jaws create | |
Subcommands: | |
endpoint Create a new API Gateway endpoint. | |
lambda Create a new AWSM Lambda. Optionally create an API Gateway endpoint for it at the same time. | |
project Create a new JAWS Project | |
region Create a new AWS Region configuration in this JAWS Project. | |
stage Create a new stage in this JAWS Project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sitapati@MacBook-Air [~/workspace/BGL-JAWS/jaws-bgl/aws_modules] $ jaws help create endpoint | |
jaws create endpoint | |
Options: | |
--endpoint, -e [string] Create an API Gateway endpoint for this AWSM Lambda | |
--name [string] Name for the newly created resource | |
--package-manager, -p [string] Specify a package manager to scaffold for publishing this AWSM Lambda | |
--runtime, -R [string] Runtime for this AWSM Lambda. Defaults to nodejs |
OlderNewer