Skip to content

Instantly share code, notes, and snippets.

Alex Robson arobson

Block or report user

Report or block arobson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View elasticsearch.toml
name = "elasticsearch.infra"
image = "elasticsearch:5.5.1-alpine"
stateful = true
containers = 1
ram = "> 256 Mi < 1024 Mi"
cpu = "> 1% < 100%"
arobson / es-service.yml
Last active Mar 18, 2018
An Elastic Search Stateful Set and Service Manifest
View es-service.yml
- apiVersion: v1
kind: Service
namespace: infra
name: es
app: es
name: es
namespace: infra
arobson / nginx.conf
Created Jun 27, 2017
npme nginx + varnish
View nginx.conf
# -----------------------------------------------------------------------------
# 1. replace `` with your public-facing domain
# 2. replace `` with your primary server's IP
# 3. replace worker_processes with 1 if host only has 1 core
# 4. add `fs.file-max = 4096` to `/etc/sysctl.conf`
# 5. copy your SSL pem file to `/etc/nginx/wildcard.pem`
# -----------------------------------------------------------------------------
user root;
worker_processes 2;
arobson / npme-cloudformation.yaml
Last active Jun 16, 2017
npme CloudFormation starter template
View npme-cloudformation.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: AWS CloudFormation Template for npm enterprise instance.
Description: Name of existing EC2 KeyPair to enable SSH access.
Type: 'AWS::EC2::KeyPair::KeyName'
ConstraintDescription: must be the name of an existing EC2 KeyPair.
Description: The IP address range that can be used to SSH to the EC2 instances
Type: String

Keybase proof

I hereby claim:

  • I am arobson on github.
  • I am arob ( on keybase.
  • I have a public key ASCE83LKQpAo2zdVrOWtZbmaqOXOo9S2cqUXWRVdyDTgiwo

To claim this, I am signing this object:

arobson /
Last active Jan 2, 2020
Rabbit.MQ + Node.js Notes

Abstraction Suggestions

Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.


As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:

  • publish
  • request
  • start/stop subscription
arobson / Topic Matching
Created May 24, 2012
Fun with applied FP
View Topic Matching
Subscribers subscribe to topics.
A topic is expressed as a period delimited namespace: "a.b.c.d"
A topic subscription may be an exact match or use wild card characters:
* - match 1 namespace segment at a specific location
# - match any number of namespace segments
When a message comes in, it will always have a fully specified topic.
The list of subscriptions with topics that would match the message's topic is the desired outcome.
arobson / forkjoin-mockjax-defs.js
Created Mar 22, 2012
Mockjax Definitions for my Fork Join Blog post
View forkjoin-mockjax-defs.js
$.mockjax( {
url: "",
type: "GET",
status: 200,
data: {
"name": "Alex Robson",
"company": "appendTo",
"public_repos": 31,
"followers": 18,
"following": 4,
arobson / Dependency URLs
Created Mar 8, 2012
A Cartographer Starter HTML Page
View Dependency URLs
These URLs should be to the actual script files and can be used for to populate tools like JS Fiddle.
View gist:1586476
zlib = require 'zlib'
module.exports = (robot) ->
robot.respond /(stack|ss) ?(find:.*) ?(tags:.*)/i, (msg)->
query = msg.match[2]
query2 = msg.match[3]
query = query.replace /find:/i, ""
query2 = query2.replace /tags:/i, ""
You can’t perform that action at this time.