Skip to content

Instantly share code, notes, and snippets.

View veggiemonk's full-sized avatar

Julien Bisconti veggiemonk

View GitHub Profile
@veggiemonk
veggiemonk / .gitconfig
Created August 26, 2019 11:54
multi config for git - gitconfig
[core]
pager = diff-so-fancy | less --tabs=4 -RFX
excludesfile = ~/.gitignore
[user]
name = Julien Bisconti
email =
signingkey = XXX
[includeIf "gitdir:~/code/bitbucket/"]
path = ~/code/bitbucket/.gitconfig
---
apiVersion: v1
kind: Service
metadata:
name: atlantis
labels:
app: atlantis
spec:
type: LoadBalancer
loadBalancerIP: ${load_balancer_ip}
@veggiemonk
veggiemonk / altantis.Dockerfile
Created July 19, 2019 11:21
Atlantis terragrunt terraform and gcloud container
FROM golang:alpine AS builder
ENV TERRAGRUNT_VERSION=0.19.9 \
TERRAGRUNT_VERSION_SHA256SUM=9226cffc6b67b48c78e659b8ed1228e41b01c6fa4bd55e26e3b56c4d488db7ea \
TERRAFORM_VERSION=0.12.5 \
TERRAFORM_VERSION_SHA256SUM=babb4a30b399fb6fc87a6aa7435371721310c2e2102a95a763ef2c979ab06ce2
WORKDIR /go/src/github.com/runatlantis/atlantis/
RUN apk --no-cache add \
@veggiemonk
veggiemonk / PodDisruptionBudget.yaml
Created July 15, 2019 11:55
GKE kubernetes upgrade
kind: PodDisruptionBudget
metadata:
name: my-app
spec:
maxUnavailable: 1
selector:
matchLabels:
app: my-app
@veggiemonk
veggiemonk / Dockerfile
Last active July 11, 2019 10:13
Build GO app in multi-stage container
FROM golang:alpine AS builder
ARG GITHUB_USER
ARG REPO_NAME
WORKDIR /go/src/github.com/$GITHUB_USER/$REPO_NAME/
COPY . .
RUN apk add --no-cache \
@veggiemonk
veggiemonk / git_update_subfolder.sh
Last active July 9, 2019 19:54
organize your git repo like go
#!/bin/bash
for r in *;
do {
echo ">>> $r" && \
cd $r && \
(git pull || echo 0) && \
cd ..
};
done;
@veggiemonk
veggiemonk / README.md
Last active June 26, 2019 13:49
TERRAFORM workshop 2

Terraform

  1. take the code from the previous workshop -> https://gist.github.com/veggiemonk/097890ff101a995f3c31f4d25b69665e
  2. install terraform 0.12 => https://releases.hashicorp.com/terraform/0.12.3/terraform_0.12.3_linux_amd64.zip
  3. convert it to Terraform 0.12 by using the command terraform 0.12upgrade
  4. make sure it works (terraform plan, terraform apply and terraform destroy)
  5. spit into modules. https://www.terraform.io/docs/modules/index.html
  6. manually go into the console, create a small VM and try to import it into the terraform state -> see https://www.terraform.io/docs/import/usage.html
  7. destroy everything.
@veggiemonk
veggiemonk / container-common-fluff.go
Last active July 9, 2019 12:11
FLUFF - connecting pipes
package main
import (
"context"
"fmt"
"net"
"net/http"
"os"
"os/signal"
"runtime"
@veggiemonk
veggiemonk / .zsh_alias
Last active August 22, 2019 13:57
Shell alias
alias ez="vim ~/.zshrc && source ~/.zshrc"
alias c="clear"
alias path='echo -e ${PATH//:/\\n}'
alias dpsa="docker ps -a"
alias dcup="docker-compose up"
alias dcupd="docker-compose up -d"
alias dcdn="docker-compose down"
alias dclf="docker-compose logs -f"
alias server="python3 -m http.server"