Skip to content

Instantly share code, notes, and snippets.

@allanharris
allanharris / awsvpc-mode-multi-targetgroup-alb.yml
Created February 5, 2022 00:03
Workaround for 'awsvpc' network-mode containers and multiple target groups from https://github.com/aws/amazon-ecs-agent/issues/1351
AWSTemplateFormatVersion: 2010-09-09
Description: |
Replicates (de)registration events from a source target group to a destionation target group
in order to workaround ECS limitation where a single container cannot automatically register
to multiple target groups
Parameters:
SourceTargetGroupArn:
Description: ARN of a source target group to replicate targets from
<!DOCTYPE html>
<html>
<head lang="en">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
</head>
<body>
<h1>Here is our 5 amazing Links!</h1>
<a id="link1" href="#">1</a>
$("#hang").html('<iframe src="http://www.howjsay.com/mp3/' + request.szo + '.mp3">');
var usStates = [
{ name: 'Alabama', code: 'AL'},
{ name: 'Alaska', code: 'AK'},
{ name: 'American Samoa', code: 'AS'},
{ name: 'Arizona', code: 'AZ'},
{ name: 'Arkansas', code: 'AR'},
{ name: 'California', code: 'CA'},
{ name: 'Colorado', code: 'CO'},
{ name: 'Connecticut', code: 'CT'},
{ name: 'Delaware', code: 'DE'},
@allanharris
allanharris / gist:2711927
Created May 16, 2012 16:30
webui\src\main\java\com\taskadapter\webui\Exporter.java
if (destinationDataHolder.getData() instanceof MSPConfig) {
// implementation of http://www.hostedredmine.com/issues/68820
// quite ugly
// TODO check for XSS attack with wrong paths...
MSPConfig config = (MSPConfig) destinationDataHolder.getData();
if (config.getOutputAbsoluteFilePath().isEmpty()) {
String userName = navigator.getServices().getAuthenticator().getUserName();
FileManager fm = new FileManager();
File f = fm.getUserFolder(userName);
String newPath = String.format("%s/%s-%s.xml", f.getAbsolutePath(), sourceDataHolder.getType(), destinationDataHolder.getType());