Skip to content

Instantly share code, notes, and snippets.

View pnpolcher's full-sized avatar

Pablo Nuñez Pölcher pnpolcher

View GitHub Profile
#!/bin/bash
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 50 GiB.
SIZE=${1:-50}
# Get the ID of the environment host Amazon EC2 instance.
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
# Get the ID of the Amazon EBS volume associated with the instance.
VOLUMEID=$(aws ec2 describe-instances \
@davidshtian
davidshtian / aws_glue_partition_nums.py
Created October 10, 2020 09:08
Get the partition numbers of all AWS Glue databases and tables.
import boto3
from prettytable import PrettyTable
res = PrettyTable()
res.field_names = ["Database", "Table", "Partition Num"]
glue = boto3.client('glue')
dbs = glue.get_databases()['DatabaseList']
@ammgws
ammgws / edgerouter_lite_openvpn.md
Last active September 2, 2024 19:06
Notes on setting up OpenVPN on Edgerouter Lite

My notes on how I setup OpenVPN server on Edgerouter Lite. Based mostly on this guide from openVPN wiki. This guide assumes easyrsa3 is being used, otherwise substitute whatever the easyrsa2 versions are for the commands below.

This guide will use 3 different machines.

A Public Key Infrastructure (PKI) will be created on each machine:

    1. Server - openVPN server (Edgerouter in this case).
    1. Client(s) - the device(s) you will be connecting from.
    1. CA Server - used to generate and sign certificates for server and clients to use.