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

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 May 3, 2024 12:56
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 January 11, 2024 18:21
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

@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

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Draft • Decorators</title>
<link rel="stylesheet" href="../../dist/Draft.css" />
</head>
<body>
<div id="target"></div>
<script src="../../node_modules/react/dist/react.js"></script>
@pthom
pthom / CLion_Ninja.md
Last active December 21, 2020 07:50 — forked from nevkontakte/CLion_Ninja.md
Ninja support for CLion IDE

Ninja support for CLion IDE

This script enables Ninja-powered builds in CLion IDE by wrapping around CMake, which it uses. See my blog post for details.

Disclaimer

This script is provided AS IS with no guarantees given or responsibilities taken by the author. This script relies on undocumented features of CLion IDE and may lead to instability of build and/or IDE. Use it on your own risk under WTFPL terms.

@sage-oli-wood
sage-oli-wood / gist:70e0931f037ea0aac132
Created November 5, 2015 17:38
F.Ugly way to push TCP network stats into DataDog. Can be run from a crontab entry
#!/bin/bash -eux
// set $DATADOGKEY to your API key
DATE=$(date +%s)
HOSTNAME=`hostname`
cat /proc/net/sockstat | grep TCP | cut -d":" -f2 |sed 's/^ //g' | awk '{print $1, $2"\n"$3, $4"\n"$5,$6"\n"$7,$8"\n"$9,$10}' > /tmp/stats.tmp
while read LINE; do
METRIC=$(echo $LINE | cut -d" " -f1)
VALUE=$(echo $LINE | cut -d" " -f2)
curl -X POST -H "Content-type: application/json" \