A minimal table to compare the Espressif's MCU families.
ESP8266 | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C6 | |
---|---|---|---|---|---|---|
Announcement Date | 2014, August | 2016, September | 2019, September | 2020, December |
# install xcodes | |
brew install robotsandpencils/made/xcodes aria2 | |
# install & select latest version of xcode | |
xcodes list | awk 'END{system("xcodes install " $1"; xcodes select " $1)}' | |
# install x86-64 homebrew | |
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# switch to x86_64 homebrew |
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
create or replace function uuid_generate_v7() | |
returns uuid | |
as $$ | |
begin | |
-- use random v4 uuid as starting point (which has the same variant we need) | |
-- then overlay timestamp | |
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
return encode( |
CC = gcc | |
RM = rm -f | |
INSTRUMENT_FOR_PROMETHEUS := false | |
ifeq ($(INSTRUMENT_FOR_PROMETHEUS),true) | |
CFLAGS = -Wall -DINSTRUMENT_FOR_PROMETHEUS | |
LIBS = -lbcm2835 -lprom -lpromhttp -lmicrohttpd | |
else | |
CFLAGS = -Wall |
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
import sys | |
# choose() is the same as computing the number of combinations. Normally this is | |
# equal to: | |
# | |
# factorial(N) / (factorial(m) * factorial(N - m)) | |
# | |
# but this is very slow to run and requires a deep stack (without tail | |
# recursion). | |
# |
IPv4 Addr | IPv6 Addr | ASn | Political Region | Loc | Svc | Org |
---|---|---|---|---|---|---|
8.8.8.8 | 2001:4860:4860::8888 | AS15169 | US | Worldwide (Anycast) | Google Public DNS | |
8.8.4.4 | 2001:4860:4860::8844 | AS15169 | US | Worldwide (Anycast) | Google Public DNS | |
1.1.1.1 | 2606:4700:4700::1111 | AS13335 | US | Worldwide (Anycast) | Cloudflare-DNS | Cloudflare/APNIC |
1.0.0.1 | 2606:4700:4700::1001 | AS13335 | US | Worldwide (Anycast) | Cloudflare-DNS | Cloudflare/APNIC |
95.85.95.85 | 2a03:90c0:999d::1 | AS199524 | EU | *W |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
This procedure will deploy Docker For AWS and go through the steps to build REX-Ray containers. This process will have some hiccups because Docker for AWS will provision resources in different availability zones (AZs). Multiple workers/agents will be spread across AZs (not regions) which means a potential host failure will trigger Swarm to restart containers that could spread across an AZ. If a container is restarted in a different AZ, the pre-emption mechanism for REX-Ray will not work because it no longer has access to the volume in the former AZ.
SSH into one of your Docker Manager Nodes