This gist shows the necessary configurations to set up the TLS termination for TCP (not HTTP) traffic
to the local RabbitMQ service running on localhost. This way, we're only managing certificates with NGINX and not
setting up TLS certificates for RabbitMQ. NGINX listens for encrypted traffic on 0.0.0.0:5671, handles it, and
proxies unencrypted traffic to the RabbitMQ services listening on localhost:5672.
This file contains hidden or 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
| /// Getting values from a database often requires a transformation of raw | |
| /// content into something suitable for your application. Using traits, I am | |
| /// going to separate the low-level statements used to access database contents | |
| /// and the transformation of that content into application values. | |
| /// | |
| /// Rant: A common solution for this is to use an ORM which abstracts away | |
| /// the database altogether. However, this has several downsides like not | |
| /// being able to use the articulate and expressive language of the database | |
| /// and also just dumbing down what you can do with the database. |
This file contains hidden or 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
| { | |
| "name": "gander", | |
| "version": "1.0.0", | |
| "description": "Web service for getting screenshops of web sites", | |
| "main": "server.js", | |
| "scripts": { | |
| "start": "node server.js", | |
| "test": "npm run test" | |
| }, | |
| "author": "Peter Sooley <peter.sooley@downstream.com>", |
This file contains hidden or 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
| <?php | |
| trait Logger { | |
| protected $channel = 'base'; | |
| public function log($msg) | |
| { | |
| echo "[{$this->channel}] $msg\n"; | |
| } | |
| } |
This file contains hidden or 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
| class Configuration | |
| constructor: (@$form, @$input) -> | |
| @data = {} | |
| update: (id, formObj, callback) -> | |
| if id == 'run' | |
| @$input.val JSON.stringify @data | |
| @$form.hide() | |
| data = |
This file contains hidden or 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
| // $('ul').depthPosition('li:nth-child(5)') | |
| (($) -> | |
| $.fn.depthPosition = (targetListItem) -> | |
| count = 1 | |
| for child in @children() | |
| if $(child).get(0) == $(targetListItem).get(0) | |
| return count | |
| else | |
| childDepths = $(child).depthPosition(targetListItem) |