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
const kmsArns: pulumi.Output<string>[] = []; | |
config.get('kmsKeys').forEach((keyArgs: KmsKeyConfig) => { | |
const kms = new KmsKeys({ | |
env: config.get('env'), | |
...keyArgs, | |
}); | |
kmsArns.push(kms.arn); | |
}); | |
const kmsInlinePolicy = pulumi.all(args.kmsKeys).apply((kmsKeys) => { |
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
" Flash screen instead of beep sound | |
" set visualbell | |
" Change how vim represents characters on the screen | |
set encoding=utf-8 | |
" Set the encoding of files written | |
set fileencoding=utf-8 | |
" Color scheme |
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
// Traefik Ingress controller ALB | |
resource "aws_lb" "traefik" { | |
name = "traefik-alb" | |
internal = false | |
load_balancer_type = "application" | |
security_groups = [aws_security_group.traefik-ingress.id] | |
subnets = data.terraform_remote_state.vpc.outputs.vpc-public-subnets | |
enable_deletion_protection = true | |
enable_cross_zone_load_balancing = false |
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
#!/usr/bin/env python | |
# Watch for DNS changes for heroku | |
import logging | |
from logging.handlers import SysLogHandler | |
import socket | |
import os | |
import yaml | |
import sys | |
import argparse |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"$$hashKey": "object:84", | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", |
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 main | |
import ( | |
"fmt" | |
"strings" | |
) | |
func contains(slice []string, item string) bool { | |
set := make(map[string]struct{}, len(slice)) | |
for _, s := range slice { |
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 main | |
import ( | |
"fmt" | |
"github.com/aws/aws-sdk-go-v2/aws" | |
"github.com/aws/aws-sdk-go-v2/aws/awserr" | |
"github.com/aws/aws-sdk-go-v2/aws/external" | |
"github.com/aws/aws-sdk-go-v2/service/route53" | |
) |
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: 2.0 | |
jobs: | |
build: | |
working_directory: ~/knex | |
docker: | |
- image: hashicorp/terraform:0.10.0 | |
steps: | |
- checkout | |
- run: |
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 main | |
func main() { | |
log.Println("Starting app...") | |
app := gin.Default() | |
app.Use(DummyMiddleware) | |
app.Use(TokenAuthMiddleware()) | |
v1 := app.Group("/v1") | |
{ | |
v1.POST("/alerts", v1Alerts) |
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 main | |
// Custom Middleware for validating token | |
func TokenAuthMiddleware() gin.HandlerFunc { | |
return func(c *gin.Context) { | |
token := c.Request.Header.Get("X-Auth") | |
fmt.Println("X-Auth: ") | |
fmt.Println(token) | |
if token == "" { |
NewerOlder