Skip to content

Instantly share code, notes, and snippets.

View andrejmaya's full-sized avatar
🇺🇦

andrejmaya

🇺🇦
View GitHub Profile
@andrejmaya
andrejmaya / ipsec_config.sh
Created July 8, 2018 07:31
Setup Site-to-Site VPN connection with Strongswan. Execute this script on each gateway and change switch the variables accordingly
export LEFT_GW_IP=35.157.246.157
export LEFT_CIDR=10.1.1.0/24
export RIGHT_GW_IP=35.158.110.212
export RIGHT_CIDR=10.2.1.0/24
sudo su
apt-get update -y
apt-get install -y strongswan
cat >> /etc/sysctl.conf << EOF
@andrejmaya
andrejmaya / aws-eks-simple-example.tf
Last active July 30, 2018 18:31
Simple AWS EKS deployment with Terraform
provider "aws" {
access_key = ""
secret_key = ""
region = "us-east-1"
}
locals {
worker_groups = "${list(
map("instance_type","t2.small",
"root_volume_size","8",
FROM ruby:alpine
RUN apk update
RUN apk add py3-pip
RUN pip3 install cfn-lint
RUN gem install cfn-nag -v 0.6.10
@andrejmaya
andrejmaya / usage_repo.sh
Created March 17, 2023 06:39
Find usage of repos (like action repos) across your Github Organization
export GITHUB_ORG=<YOUR_GITHUB_ORG>
#!/bin/bash
REPO_PATTERN=$1
if [[ ! -z $REPO_PATTERN ]];then
repos=$(gh search repos --match=name ${GITHUB_ORG}/$REPO_PATTERN | grep ${GITHUB_ORG}/$REPO_PATTERN | awk '{gsub("${GITHUB_ORG}/","",$1); print $1}')
for repo in $repos
do