Skip to content

Instantly share code, notes, and snippets.

View vincedgy's full-sized avatar
🚀
I'm even more versatile using AI assistants

Vincent DAGOURY vincedgy

🚀
I'm even more versatile using AI assistants
View GitHub Profile
@guillaumesmo
guillaumesmo / custom-task-definition.yml
Last active June 20, 2021 14:14
CloudFormation Custom Task Definition POC
# Sources:
# https://cloudonaut.io/how-to-create-a-customized-cloudwatch-dashboard-with-cloudformation/
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html
# https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECS.html
Resources:
CustomTaskDefinition:
Type: 'Custom::TaskDefinition'
Version: '1.0'
Properties:
@pgchamberlin
pgchamberlin / keycloak_aws_deployment.md
Last active October 25, 2024 09:00
Deploying Keycloak to AWS using a Ubuntu AMI

Deploying Keycloak to AWS

The objective of this guide is to deploy Keycloak to AWS in a minimally complex way for testing and discovery purposes. This means using the standalone build of Keycloak backed with Hibernate H2. The result is not a production ready system. It won't scale, it won't survive significant load, it can't be clustered.

Mostly this Gist is a distillation of the Keycloak Server Installation guide for a specific use case: to spin up a quick and dirty Keycloak instance for testing and experimenting.

Steps

  • Spin up and configure a Ubuntu AMI
  • Install and configure Keycloak with an SSL cert
@johndobrien
johndobrien / gist:3101086
Created July 12, 2012 21:21
Using copy_expert to copy rows to a different database
import psycopg2
from psycopg2.extensions import ISOLATION_LEVEL_SERIALIZABLE
conn_str = "dbname='{db}' user='john' host='localhost' password='john'"
table_sql = "CREATE TABLE bigdata (A INT PRIMARY KEY, b TEXT, c TEXT NOT NULL);"
conn1 = psycopg2.connect(conn_str.format(db='test-1'))
conn2 = psycopg2.connect(conn_str.format(db='test-2'))