Skip to content

Instantly share code, notes, and snippets.

@dmikusa
dmikusa / README.md
Created August 17, 2017 15:25
Example using Node.js to get an Auth Code from Cloud Foundry's UAA for use with SSH (i.e. same as `cf ssh-code`)

To test this:

  1. Run npm install or yarn install
  2. Run node index.js && ssh -p 2222 cf:$(cf app app-name --guid)/0@ssh.system.domain.com, where app-name is your app name and ssh.system.domain.com is the DNS name of your SSH end point.
  3. When prompted for a password, enter the code listed after Access Code is.

You should now be SSH'd into the given application & instance id.

NOTE: better error handling should be done, but has been omitted to keep this example brief.

@bdlangton
bdlangton / phpcs.txt
Last active May 27, 2022 00:49
phpcs config-set for Drupal using Coder module
# Basic default configs.
phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer
phpcs --config-set default_standard Drupal
phpcs --config-set colors 1
# Show all errors.
phpcs --config-set error-severity 1
# Shows warnings, but doesn't return a non-zero return.
phpcs --config-set ignore_warnings_on_exit 1
@jeremyb
jeremyb / documents.yaml
Last active October 5, 2020 15:54 — forked from anonymous/documents.yaml
Hierarchical facets with Elasticsearch
_type: product
category_level0: Books
category_level1: Computers & Technology
category_level2: Network Programming
name: Pro AngularJS
---
_type: product
category_level0: Books