Skip to content

Instantly share code, notes, and snippets.

View ddragosd's full-sized avatar

ddragosd

  • Adobe System
  • San Jose, CA
View GitHub Profile
@ddragosd
ddragosd / Makefile
Created July 24, 2019 12:48
Quick Envoy load test
envoy:
docker run --rm -p 9191:9191 --ulimit nofile=1024000:1024000 -v `pwd`/envoy.yaml:/etc/envoy/envoy.yaml --entrypoint envoy envoyproxy/envoy:latest -c /etc/envoy/envoy.yaml -l off --concurrency 4
nginx:
docker run -p 8080:8080 --rm --ulimit nofile=1024000:1024000 -v `pwd`/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf brndnmtthws/nginx-echo-headers
test-envoy:
docker run --rm williamyeh/wrk:4.0.1 -t4 -c1000 -d30s --latency http://172.17.0.1:9191/test
test-nginx:
@ddragosd
ddragosd / alexa-demo.js
Last active January 18, 2017 23:08
openwhisk-alexa-demo
/**
* Handler for Amazon Alexa.
* SAMPLE EVENT:
*
{
"session": {
"sessionId": "SessionId.baae4592-3194-463d-a1bf-a4cea0622913",
"application": {
"applicationId": "amzn1.ask.skill.647acd60-f1e7-4f77-9d5e-90c4a4cdfd76"
},
@ddragosd
ddragosd / apigateway-src-apache.tar.gz
Last active October 24, 2016 21:39
API Gateway - SRC
This file has been truncated, but you can view the full file.
@ddragosd
ddragosd / api-gateway-marathon-setup.sh
Last active April 9, 2018 04:31
API Gateway setup in Mesos and Marathon
# PREREQUISITES:
# Setup a Mesos cluster and install Marathon framework
MARATHON_HOST="http://<marathon_host>/marathon"
# this could be an internal ELB that the Gateway nodes can use to auto-discover services
INTERNAL_MARATHON_HOST="http://<internal_marathon_host>/marathon"
# a wildcard domain configured with *.api.anydomain
API_DOMAIN="api.<my-domain>"
# -------------------------
@ddragosd
ddragosd / Gruntfile.coffee
Last active December 20, 2015 15:09
Grunt JS script for Apache Sling with CoffeeScript
module.exports = (grunt) ->
# load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
# configurable paths
buildProperties = {
app: 'target/js',
dist: 'target/coffee/js',
sling_url: grunt.option('sling_url') || 'http://localhost:8080/content/js',
sling_username: grunt.option('sling_username') || 'admin',