Skip to content

Instantly share code, notes, and snippets.

@mehd-io
mehd-io / ducklake_playground.sql
Last active June 12, 2025 23:36
Ducklake Playground with AWS S3 and Postgres
-- Don't forget to first sign-in through sso using aws sso login
CREATE OR REPLACE SECRET secret(
TYPE s3,
PROVIDER credential_chain
);
-- first let's create a Ducklake catalog
CREATE SECRET(
TYPE postgres,
HOST '',
@epoz
epoz / hang_player.py
Created August 3, 2024 10:32
Simple MIDI .wav Python player for FGDP-50 Hang Drum fun
import mido, os, random
import simpleaudio as sa
INPUT = "./Hang Drum Samples"
wavs = {}
for x in os.listdir(INPUT):
if x.endswith(".wav") and len(x) == 7:
wavs.setdefault(x[0], []).append(x)
note_map = {
@craiglpeters
craiglpeters / dev-containers-cloud-native.md
Last active March 29, 2025 18:23
Dev Containers in the Cloud Native Ecosystem

Dev Containers

https://containers.dev an open spec that extends container definition to also include dev environment configuration including:

  • packages
  • lifecycle automation
  • processes
  • IDE configurations
  • remote connection
  • port forwarding
# Source: https://gist.github.com/6fb3e7da327df9203d9d4c184fcb5831
##############################################################################
# Combining Argo CD (GitOps), Crossplane (Control Plane), And Kubevela (OAM) #
# https://youtu.be/eEcgn_gU3SM #
##############################################################################
# Referenced videos:
# - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4
# - Cloud-Native Apps With Open Application Model (OAM) And KubeVela: https://youtu.be/2CBu6sOTtwk
@sindresorhus
sindresorhus / esm-package.md
Last active June 28, 2025 20:09
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
# Source: https://gist.github.com/a156975ae372bf15284e15c489aab4aa
##########################################################################
# Crossplane #
# Using Kubernetes API and GitOps to manage Infrastructure as Code (IaC) #
# https://youtu.be/n8KjVmuHm7A #
##########################################################################
# Referenced videos:
# - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4
# Source: https://gist.github.com/48f44d3974db698d3127f52b6e7cd0d3
###########################################################
# Automation of Everything #
# How To Combine Argo Events, Workflows, CD, and Rollouts #
# https://youtu.be/XNXJtxkUKeY #
###########################################################
# Requirements:
# - k8s v1.19+ cluster with nginx Ingress
@Mark-McCracken
Mark-McCracken / repo-permissions.tf
Created December 31, 2020 02:35
terraform GitHub repo permissions
# grant permissions to just one specific repo
resource github_team_repository reconciliations_analysts {
repository = github_repository.reconciliations.name
team_id = github_team.analysts.id
permission = "push"
}
# grant permissions to all repos, if they've got the airflow tag
resource github_team_repository airflow_engineers {
for_each = toset([ for repo in local.airflow_repos: repo["name"] ])
@hermanbanken
hermanbanken / kustomize_vars.md
Created November 22, 2020 13:11
Kustomize Vars example

This was initially posted in an kubernetes-sigs/kustomize issue.

We are using Kustomize's vars feature. Initially we didn't understand how to use it for our purpose, but it is a 100% fit. One example is our Ingress resource, which looks like this:

# file: base/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: services

Bootstrap

Init:

gotk bootstrap github \
  --owner=gitopsrun \
  --repository=fleet-infra \
  --branch=main \
  --team=dev \