This file contains 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
public interface CmdFunction{ | |
public void call(Object param); | |
} | |
// This is the function where you need a function passed in as a param | |
public void tellMeWhatTodo(CmdFunction cmd) { | |
if (something) { | |
cmd.call('me'); | |
} |
This file contains 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
#!/bin/bash | |
set -e | |
# Usage: ./update-status.sh --sha=somesha \ | |
# --repo=edyn/service-identity \ | |
# --status=pending \ | |
# --message="Starting tests" \ | |
# --context=edyn/e2e \ | |
# --url=http://something.com |
This file contains 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
echo "Download and install configuration" | |
STACK=`curl -s http://rancher-metadata/latest/self/stack/name` | |
export STACK | |
echo "Running in stack $STACK" | |
curl -L -H 'Cache-Control: no-cache' https://gist.githubusercontent.com/ecstasy2/b03381ca42d1df394decb14582cd8726/raw > /tmp/services.conf | |
cat /tmp/services.conf | envsubst '$STACK' | tee /etc/nginx/conf.d/services.conf | |
curl -L -H 'Cache-Control: no-cache' https://gist.githubusercontent.com/ecstasy2/74da089e617f6e9211dd00146054cfb1/raw > /etc/nginx/proxy_params |
This file contains 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
resolver 169.254.169.250; | |
server { | |
listen 80 default_server; | |
return 200 'Ok!'; | |
add_header Content-Type text/plain; | |
} | |
server { | |
listen 80; |
This file contains 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
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
client_max_body_size 100M; | |
client_body_buffer_size 1m; | |
proxy_intercept_errors on; | |
proxy_buffering on; | |
proxy_buffer_size 128k; | |
proxy_buffers 256 16k; |
This file contains 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
var Notifier = require('@ecstasy2/notifier') | |
// | |
var DeviceInactive = Notifier.create({ | |
trigger: { | |
type: 'cron', | |
scope: 'device', | |
recurrence: '* */2 * * *', | |
}, |