utility belt: http://underscorejs.org/
_ = require "underscore"command-line option parser: https://github.com/npm/nopt
nopt = require "nopt"our server
| Error Page Exception | |
| SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below. | |
| Original Exception: | |
| Error Message: javax.servlet.ServletException: Filter [VectorCommonFilter]: filter is unavailable. | |
| Error Code: 500 | |
| Target Servlet: action |
utility belt: http://underscorejs.org/
_ = require "underscore"command-line option parser: https://github.com/npm/nopt
nopt = require "nopt"our server
| #!/usr/bin/env coffee | |
| # filter for the cloud foundary `cf m` command; use as: | |
| # cf m | cfm.coffee | |
| process.stdin.setEncoding "utf8" | |
| stdin = "" | |
| process.stdin.on "readable", -> |
When using Cloudant with BlueMix, the credentials for your database show up in various places:
| Cloudant | ACE | VCAP_SERVICES |
---------------------------------------------------------------
| https://<user>.cloudant.com | URL | url |
| <db name> | Database Name | database |
| API Key key | Username | username |
| API Key password | Password | password |
Presumably the complete URL would be:
The cf-env package provides parsing of Cloud Foundry-provided environment variables when you app is running. Provides easy access to your port, http binding host name/ip address, URL of the application, etc. Also provides useful default values when you're running locally.
| #!/usr/bin/env coffee | |
| #------------------------------------------------------------------------------- | |
| # if you set your prompt thusly: | |
| # | |
| # PS1="\w \$ " # add an extra \n at the beginning, maybe? | |
| # | |
| # you can capture the text from your terminal session, including the | |
| # prompts, and then filter with this program (pass to stdin), which | |
| # will produce stand-alone HTML for the terminal session, with the |
| var path = require("path") | |
| setTimeout(printModules, 2000) | |
| function printModules(mod, indent, root) { | |
| if (!mod) mod = module | |
| if (!indent) indent = "" | |
| if (!root) root = path.dirname(mod.filename) | |
| modName = path.relative(root, mod.filename) |
| /** | |
| * New Relic agent configuration. | |
| * | |
| * See lib/config.defaults.js in the agent distribution for a more complete | |
| * description of configuration variables and their potential values. | |
| */ | |
| var pkg = require("./package.json") | |
| var APP_NAME = pkg.name || "unnamed-app" |
| // old style, hard-coded registration | |
| // require("newrelic) | |
| // new style, optional registration | |
| require("./newrelic").initialize() |
| 38 38 40 40 37 39 37 39 66 65 13 | |
| cu cu cd cd cl cr cl cr b a en |