Skip to content

Instantly share code, notes, and snippets.

@jed204
jed204 / cloudbuild.yaml
Created October 30, 2019 05:36
Google Cloud Build Maven Build with Cache
steps:
# Grab cached M2 repo
- name: gcr.io/cloud-builders/gsutil
id: Get M2 Cache
args: ['cp', 'gs://BUCKET_NAME/m2.tar.gz', 'm2.tar.gz']
# See https://github.com/GoogleCloudPlatform/cloud-builders-community to get the tar command
- name: gcr.io/PROJECT_ID/tar
id: Expand M2 Cache
args: ['xpzf', 'm2.tar.gz']
# Optional, we had some extra settings to include
@MrGraversen
MrGraversen / cloud-init-docker-etc.yaml
Last active March 3, 2025 15:02
Base cloud-init for security hardening, SSH, Docker, etc.
#cloud-config
package_update: true
manage_resolv_conf: true
resolv_conf:
nameservers:
- '8.8.8.8'
- '8.8.4.4'
- '1.1.1.1'
@fabiolimace
fabiolimace / UUIDv6.sql
Last active July 21, 2025 13:35
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
@xuwei-k
xuwei-k / Converter.scala
Last active May 17, 2021 20:38
Google Cloud Functions with Scala unfiltered
package unfiltered_cloud_function
import com.google.cloud.functions.{HttpFunction, HttpRequest, HttpResponse}
import java.io.OutputStream
import scala.jdk.CollectionConverters._
import java.util.Collections
object Converter {
def request(req: HttpRequest): unfiltered.request.HttpRequest[HttpRequest] =
new unfiltered.request.HttpRequest[HttpRequest](req) {