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
rabbitmq: | |
image: rabbitmq:3-management | |
ports: | |
- "5672:5672" | |
- "15672:15672 |
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
'use strict'; | |
const config = { | |
rabbitLocation: '', | |
reconnectTimeout: 4000 | |
}; | |
let subscriptionHandlerModule = require('./messaging/subscription-handler'); | |
let subscriptionHandlerInstance; |
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
# spec/shorten_array_spec.rb | |
require 'shorten_array.rb' | |
describe ShortenArray do | |
it 'returns the first 2 items from the array' do | |
best_array_ever = %w[best array ever] | |
result = ShortenArray.first_two_items(best_array_ever) | |
expect(result).to eq %w[best array] | |
end | |
end |
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
# lib/shorten_array.rb | |
module ShortenArray | |
def self.first_two_items(array) | |
[array[0], array[1]] | |
end | |
end |
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
import boto3 | |
client = boto3.client('cloudwatch') |
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
while IFS= read line; do | |
git clone --bare git@github.com:arup-group/$line.git | |
cd $line.git | |
git push --mirror git@github.com:parup-group/$line.git | |
rm -fr $line.git | |
done |
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
version: "3" | |
services: | |
# this could be enabled once the server container is added | |
server: | |
build: | |
. | |
depends_on: | |
- database | |
- redis |
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 http = require('http'); | |
//create a server object: | |
http.createServer(function (req, res) { | |
res.write(JSON.stringify(req.headers)); //write a response to the client | |
res.end(); //end the response | |
}).listen(3000); //the server object listens on port 8080 |
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
fields @timestamp, @message | |
| parse @message "* * * * * * * * * * * * * *" as version, account_id, interface_id, srcaddr, dstaddr, srcport, dstport, protocol, packets, bytes, start, end, action, log_status | |
| filter action = "REJECT" | |
| sort @timestamp desc | |
| limit 2000 |
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
Parameters: | |
instanceType: | |
Description: Instance type | |
Type: String | |
Default: r6i.xlarge | |
availabilityZone: | |
Description: Availability Zone | |
Type: String | |
Default: us-east-1i | |
vpcId: |
OlderNewer