Skip to content

Instantly share code, notes, and snippets.

@fabiolimace
fabiolimace / UUIDv6.sql
Last active December 19, 2025 16:50
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023-2024 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@sportebois
sportebois / ecr-add-tag.sh
Created March 29, 2018 18:55
Add tag to a docker image in ECR via AWS CLI
#!/usr/bin/env bash
function ecr-add-tag() {
if (( $# < 3 )); then
echo "Wrong number of arguments. Usage: ecr-add-tag ECR_REPO_NAME TAG_TO_FIND TAG_TO_ADD [AWS_PROFILE]"
return
fi
local repo_name=$1
local existing_tag=$2
local new_tag=$3
@caruccio
caruccio / ebs-pvc-migrate.sh
Last active May 27, 2025 11:04
Migrate EBS based PVC to other cluster and/or availability zone
#!/bin/bash
#
# 05-08-2024: Complete rewrite
# 22-05-2025: Add flag --create-test-pod
#
usage()
{
cat <<-EOF
Usage: $0 <REQUIRED-PARAMETERS...> [OPTIONAL-PARAMETERS...]