Skip to content

Instantly share code, notes, and snippets.

View gnagel's full-sized avatar
🥳
Cranking on new projects, and nuking tech debt with a flamethrower 🔥

Glenn Nagel gnagel

🥳
Cranking on new projects, and nuking tech debt with a flamethrower 🔥
View GitHub Profile
@gnagel
gnagel / go-github.pull-all.go
Created November 26, 2024 18:04 — forked from m1cm1c/go-github.pull-all.go
Go code for pulling all contents of a GitHub repository to the local file system. This is not a git clone, fetch, merge nor pull. Adapted from: https://gist.github.com/jaredhoward/f231391529efcd638bb7
package main
import (
"context"
"crypto/sha1"
"encoding/hex"
"fmt"
"io"
"os"
"path/filepath"
@m1cm1c
m1cm1c / go-github.pull-all.go
Last active April 27, 2025 09:26
Go code for pulling all contents of a GitHub repository to the local file system. This is not a git clone, fetch, merge nor pull. Adapted from: https://gist.github.com/jaredhoward/f231391529efcd638bb7
package main
import (
"context"
"crypto/sha1"
"encoding/hex"
"fmt"
"io"
"os"
"path/filepath"

Understanding Comparative Benchmarks

I'm going to do something that I don't normally do, which is to say I'm going to talk about comparative benchmarks. In general, I try to confine performance discussion to absolute metrics as much as possible, or comparisons to other well-defined neutral reference points. This is precisely why Cats Effect's readme mentions a comparison to a fixed thread pool, rather doing comparisons with other asynchronous runtimes like Akka or ZIO. Comparisons in general devolve very quickly into emotional marketing.

But, just once, today we're going to talk about the emotional marketing. In particular, we're going to look at Cats Effect 3 and ZIO 2. Now, for context, as of this writing ZIO 2 has released their first milestone; they have not released a final 2.0 version. This implies straight off the bat that we're comparing apples to oranges a bit, since Cats Effect 3 has been out and in production for months. However, there has been a post going around which cites various compar

@benjaminjkraft
benjaminjkraft / datastore_v3.pb.go
Created May 26, 2020 17:45
first-gen compatible key encoding
// Package gaepb is copied from cloud.google.com/go/datastore/internal/gaepb,
// which copied a subset of google.golang.org/appengine/internal/datastore.
// It includes the Reference, Path, and Path_Element protos.
//
// They are copied there, and here, to provide compatibility to decode keys
// generated by the google.golang.org/appengine/datastore package. Copying the
// minimal amount of protos to support key decoding means we don't need to add
// a dependency on the appengine/datastore package.
//
// Other than the above comment, code generated by protoc-gen-go. DO NOT EDIT.
@lucasponce
lucasponce / istio-gke-kiali
Last active May 13, 2021 16:58
Install Istio in Google Kubernetes Engine + Update Kiali to latest
[0] Pre-requisites
Install google-cloud-sdk in your laptop
Documentation: https://cloud.google.com/sdk
Install helm in your laptop.
Documentation: https://helm.sh/docs/using_helm/#installing-helm
Get latest Istio.
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.1.7 sh -

WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK

Install Proxmox, RancherOS, in a VM with Rancher 2.0 and Portainer

Setup Proxmox

  1. Install Proxmox 5.3
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
  4. edit the file to look like this
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active March 22, 2025 07:22
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@kekru
kekru / 1-Enable Docker Remote API with TLS client verification.md
Last active September 20, 2025 16:38
Docker Remote API with client verification via daemon.json

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@hemebond
hemebond / 0_article.md
Last active December 11, 2025 00:21
A SaltStack AWS Auto Scaling Solution

A SaltStack AWS Auto Scaling Solution

Overview

The AWS Auto Scaling Goup, configured with a customised Cloud-Init file, sends a notification to an SNS Topic, which in turn passes it onto an SQS queue that the Salt Master is subscribed to. A Reactor watches for the auto scaling events and pre-approves the new minion based on its Auto Scaling group name and instance ID.

Salt Master Configuration

@r10r
r10r / README.md
Created August 14, 2016 11:22 — forked from eliquious/README.md
Golang OpenPGP examples

Building

go build -o goencrypt main.go

Generating Keys