Skip to content

Instantly share code, notes, and snippets.

View uolter's full-sized avatar

Walter Traspadini uolter

View GitHub Profile
@uolter
uolter / kv_exp_dates.sh
Created December 27, 2021 13:43
List certificate expire dates in azure key vault
#!/bin/bash
###############################
# pip install python-dateutil #
###############################
KEYVAULTS=$(az keyvault list --query "[].name" -o tsv)
# KEYVAULTS="<space_delimited_list_of_vault_names>"
for KEYVAULT in $KEYVAULTS; do
for CERT in $(az keyvault certificate list \
@uolter
uolter / tls_check.go
Created December 27, 2021 12:50
Check TLS (https) certificate
package main
import (
"crypto/tls"
"flag"
"fmt"
"log"
"os"
"time"
)
@uolter
uolter / main.go
Last active November 11, 2021 10:19
Go check SSL/TLS
package main
import (
"crypto/tls"
"fmt"
"time"
)
type target struct {
domain string
@uolter
uolter / iplookup.go
Created January 22, 2021 13:49
IP Lookup ... reads form a txt file a list of domains and gets their ip addresses
package main
import (
"bufio"
"fmt"
"net"
"os"
)
func readDomainsFromFile(filePath string) (domains []string, err error) {
@uolter
uolter / release-notes.sh
Last active August 5, 2020 08:37
Bash script to create a Release with updated CHANGELOG file
#!/bin/bash
latest_tags () {
echo "Latest tags!"
git describe --tags `git rev-list --tags --max-count=3`
echo "Status"
git status -uno
}
const https = require('https');
const fs = require('fs');
const hostname = 'Todo';
var outstanding_reqs = 0;
var got_continue = false;
function readTextFile() {
@uolter
uolter / terraform_terragrunt_aliases
Created June 3, 2020 12:02
Useful Terraform and Terrgagrunt aliases
# Terraform
alias trf='terraform'
## Terragrunt
alias trg='terragrunt'
alias trgfmt='terragrunt hclfmt'
alias trglint='find . -type f -not -path "*/\.*" | grep ".hcl" | terragrunt hclfmt'
alias trgcleancache='find . -type d -name ".terragrunt-cache" -prune -exec rm -rf {} \;'
function trginitall() {
@uolter
uolter / lambda_stop.py
Last active January 23, 2018 10:27
AWS lambda which stops EC2 instances with Env Dev tag
import boto3
# Enter the region your instances are in. Include only the region without specifying Availability Zone; e.g., 'us-east-1'
region = 'eu-west-1'
filters = [{'Name':'tag:Env', 'Values':['Dev']}]
def lambda_handler(event, context):
ec2 = boto3.client('ec2', region_name=region)
@uolter
uolter / haproxy.cfg
Created December 15, 2017 15:29
haproxy load balancing configuration Aloha load-balancer
# Global settings
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
@uolter
uolter / haproxy.cfg
Created December 15, 2017 15:02
haproxy load balancing with Round Robin
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy