Skip to content

Instantly share code, notes, and snippets.

Software developer @ Elastic working on Kibana. Previously @ NodeSource, IBM.

Patrick Mueller pmuellr

Software developer @ Elastic working on Kibana. Previously @ NodeSource, IBM.
View GitHub Profile
pmuellr / gist:8872414
Created Feb 7, 2014
When you view the photographs of your car at, it shows the photos, followed by the stacks below, in the page. It's been doing this for over 6 months.
View gist:8872414
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
View foo.litcoffee
pmuellr /
Created Mar 5, 2014
filter for the cloud foundary `cf m` command
#!/usr/bin/env coffee
# filter for the cloud foundary `cf m` command; use as:
# cf m |
process.stdin.setEncoding "utf8"
stdin = ""
process.stdin.on "readable", ->
pmuellr /
Last active Aug 29, 2015
Cloudant, ACE, and VCAP_SERVICES

When using Cloudant with BlueMix, the credentials for your database show up in various places:

| Cloudant                    | ACE           | VCAP_SERVICES |
| https://<user> | URL           | url           |
| <db name>                   | Database Name | database      |
| API Key key                 | Username      | username      |
| API Key password            | Password      | password      |

Presumably the complete URL would be:



The ToDo sample apps are meant to be simple demos of how you can take advantage of BlueMix and a database service.

The ToDo app is pretty simple, it allows you to add an persist ToDos that you need to get done. As you complete different ToDos you can mark them done and eventually delete them from the list. The ToDos are stored in a database.


cf-env - access your CloudFoundry environment objects

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.

pmuellr /
Last active Aug 29, 2015
nice html from a specially prompted shell session
#!/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
View show_modules.js
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)
pmuellr / server.js
Created May 19, 2014
new-relic-on-cloudfoundry server.js
View server.js
// old style, hard-coded registration
// require("newrelic)
// new style, optional registration
pmuellr / newrelic.js
Last active Aug 29, 2015
new-relic-on-cloudfoundry newrelic.js
View newrelic.js
* 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 = || "unnamed-app"
You can’t perform that action at this time.