Skip to content

Instantly share code, notes, and snippets.

View carlgieringer's full-sized avatar
:shipit:

Carl Gieringer carlgieringer

:shipit:
View GitHub Profile

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.
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@dtheodor
dtheodor / listen_sqla.py
Last active August 7, 2023 11:38
Listen for pg_notify with SQL Alchemy + Psycopg2
import select
import datetime
import psycopg2
import psycopg2.extensions
from sqlalchemy import create_engine, text
engine = create_engine("postgresql+psycopg2://vagrant@/postgres")
@todgru
todgru / ssh-tunnel.md
Last active May 6, 2023 15:32
How to set-up a SSH tunnel for AWS RDS

SSH Tunnel

Our db is hosted on Amazon. Our web server can connect to the db. Connections to the db are not allowed outside of the web server.

Run ssh tunnel locally:

This creates a tunnel from my local machine to the web server:

ssh -N -L 3307:my-rds-db.us-east-1.rds.amazonaws.com:3306 ec2-my-web-server.compute-1.amazonaws.com
@codysoyland
codysoyland / virtualenv-auto-activate.sh
Created March 25, 2012 18:34
virtualenv-auto-activate
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
@cathcart
cathcart / Simplex.py
Created August 30, 2011 16:44 — forked from redacted/Simplex.py
Simplex algorithm in Python (c) 2001 Vivake Gupta, retrieved from archive.org
#!/usr/bin/env python
#
# Copyright (c) 2001 Vivake Gupta (vivakeATomniscia.org). All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,