This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.models.baseoperator import BaseOperator | |
from airflow.utils.decorators import apply_defaults | |
import re | |
class TemplateOperator(BaseOperator): | |
@apply_defaults | |
def __init__( | |
self, | |
template_file_path=None, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import json | |
region = 'us-west-2' | |
ec2 = boto3.client('ec2', region_name=region) | |
def lambda_handler(event, context): | |
sns = event['Records'][0]['Sns'] | |
print('Message :' + sns['Message']) | |
message = json.loads(sns['Message']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonOutput | |
def mapEnvironmentToAWS = [ | |
"Team1": [ | |
ec2InstanceIds: ['i-someEc2Id-1'], | |
], | |
"Team2": [ | |
ec2InstanceIds: ['i-someEc2Id-2'] | |
] | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Keycloak from 'keycloak-js'; | |
... | |
const keycloakConfig = { | |
"url": "/auth", | |
"realm": "your-realm-name", | |
"clientId": "vue_frontend", | |
"onLoad": "login-required" | |
}; | |
const keycloak = Keycloak(keycloakConfig); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
networks: | |
mynetwork: | |
name: mynetwork | |
attachable: true | |
services: | |
postgres: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
root /opt/nginx/html; | |
resolver 127.0.0.11 valid=1s ipv6=off; | |
access_by_lua ' | |
local opts = { | |
redirect_uri_path = "/redirect_uri", | |
accept_none_alg = true, | |
discovery = "http://host.docker.internal:3333/auth/realms/myrealm/.well-known/openid-configuration", | |
client_id = "nginx", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openresty/openresty:alpine-fat | |
RUN mkdir /var/log/nginx | |
RUN apk add --no-cache openssl-dev | |
RUN apk add --no-cache git | |
RUN apk add --no-cache gcc | |
RUN luarocks install lua-resty-openidc | |
ENTRYPOINT ["/usr/local/openresty/nginx/sbin/nginx", "-g", "daemon off;"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package java_experiments; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.Properties; | |
/* | |
* This class helps to convert a property file entries into cloudformation script to add them as SSM::Parameter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
postgres: | |
image: postgres:11.2-alpine | |
environment: | |
POSTGRES_PASSWORD: '!abcd1234' | |
POSTGRES_USER: purplecow | |
POSTGRES_DB: purple_cow | |
volumes: | |
- ./postgres-data:/var/lib/postgresql/data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build -t myapp . |