Skip to content

Instantly share code, notes, and snippets.

View swlasse's full-sized avatar

Lasse Christiansen swlasse

  • Amazon Web Services
  • Kävlinge, Sweden
  • X @sw_lasse
View GitHub Profile
@0xdabbad00
0xdabbad00 / privileges.txt
Last active April 20, 2021 18:28
AWS IAM privileges as found using the AWS Policy Generator described at https://summitroute.com/blog/2018/06/28/aws_iam_vs_api_vs_cloudtrail/
a4b:AssociateDeviceWithRoom
a4b:AssociateSkillGroupWithRoom
a4b:CreateProfile
a4b:CreateRoom
a4b:CreateSkillGroup
a4b:CreateUser
a4b:DeleteProfile
a4b:DeleteRoom
a4b:DeleteRoomSkillParameter
a4b:DeleteSkillGroup

The information below was written in Oct 2017. In August 2019 AWS launched official support for multiple target groups per AWS ECS service. Please use that feature instead!


Unfortunately as of writing this (Oct 18, 2017) there is no built in integration for multiple target groups per AWS ECS service. Here are a few things you can try:

  1. If your application just serves port 80 (HTTP) & port 443 (HTTPS) then you should consider using the application load balancer and terminating SSL at the load balancer. This will allow your application to function using just port 80.
@jespereneberg
jespereneberg / One import via join.yaml
Last active May 25, 2020 09:31
Fn::ImportValue from other stacks
Tags:
- Key: Name
Value:
!Join ['_', [ ec2, "Fn::ImportValue" : {"Fn::Sub":'${BaseStackName}-Environment'}, test2]]
#This will create a name tag with value: ec2_<yourValueFromOtherStack>_test2
@bradwilson
bradwilson / Cacheability.cs
Created January 23, 2014 20:53
Using chaining to create cached results in ASP.NET Web API v2
public enum Cacheability
{
NoCache,
Private,
Public,
}
@drub0y
drub0y / DispatcherTaskScheduler.cs
Last active December 2, 2022 15:36
A .NET TPL TaskScheduler implementation that spins up STA threads running a Dispatcher message pump which enables the execution of logic that leverage System.Windows.* components. Why? Well, without this, the use of System.Windows.* components will create a new Dispatcher instance on the currently executing thread and since that thread is a) not…
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Collections.Concurrent;
using System.Windows.Threading;
@thomaspark
thomaspark / subnav.css
Last active June 6, 2023 10:19
Subnav for Bootstrap 2
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
@mluton
mluton / gist:3990658
Created October 31, 2012 23:37
Display UIActivityViewController in a Popover
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"something"] applicationActivities:nil];
self.popover = [[UIPopoverController alloc] initWithContentViewController:activityViewController];
self.popover.delegate = self;
[self.popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@gbishop
gbishop / iPadAudio
Created December 21, 2011 20:04
Play sound on the iPad from Javascript using jquery mobile
I keep forgetting how to do this...
To play audio in Safari on the iPad using javascript you have to create the audio node in response to a user event. You have to give the audio node a legal url and call load. Then reuse that same node to play sounds in the future.
In jquery mobile I bound to the 'tap' event on body. If I haven't already created the audio object I create it there. Then I can use it later.