Skip to content

Instantly share code, notes, and snippets.

@git-josip
git-josip / main.go
Created February 16, 2021 10:03 — forked from jicowan/main.go
ECS Fargate tasks that are stopped by Spot interruptions are not deregistered from load balancers automatically. This function deregister an ECS Fargate Spot task from an AWS load balancer when it is interrupted..
package main
import (
"context"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/aws/aws-sdk-go-v2/service/ecs"
"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2"
@git-josip
git-josip / PaypalController.scala
Created February 25, 2016 06:38 — forked from mslinn/PaypalController.scala
Paypal IPN script for Play 2.1
package controllers
import play.api._
import libs.ws.WS
import play.api.mvc._
import com.micronautics.paypal.{TransactionProcessor, PaypalTransactions}
import java.net.URLEncoder
import concurrent.{Await, ExecutionContext}
import concurrent.duration.Duration
import java.util.concurrent.TimeUnit