Skip to content

Instantly share code, notes, and snippets.

View pmuellr's full-sized avatar
🌀
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
pmuellr / gist:8872414
Created February 7, 2014 21:38
When you view the photographs of your car at http://ncquickpass.com, it shows the photos, followed by the stacks below, in the page. It's been doing this for over 6 months.
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
@pmuellr
pmuellr / cfm.coffee
Created March 5, 2014 18:18
filter for the cloud foundary `cf m` command
#!/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", ->
@pmuellr
pmuellr / vcap-services-cloudant.md
Last active August 29, 2015 13:57
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>.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:

@pmuellr
pmuellr / cf-env-README.md
Created March 12, 2014 12:46
readme for cf-env

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
pmuellr / console-ize.coffee
Last active August 29, 2015 13:58
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
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
pmuellr / newrelic.js
Last active August 29, 2015 14:01
new-relic-on-cloudfoundry 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 = pkg.name || "unnamed-app"
@pmuellr
pmuellr / server.js
Created May 19, 2014 16:25
new-relic-on-cloudfoundry server.js
// old style, hard-coded registration
// require("newrelic)
// new style, optional registration
require("./newrelic").initialize()
@pmuellr
pmuellr / easter-egg.txt
Created May 23, 2014 20:53
npm easter egg
38 38 40 40 37 39 37 39 66 65 13
cu cu cd cd cl cr cl cr b a en