Skip to content

Instantly share code, notes, and snippets.

View eraclitux's full-sized avatar
☁️
scaling all the things

Andrea Masi eraclitux

☁️
scaling all the things
View GitHub Profile
@aver-ua
aver-ua / air-quality.yaml
Last active November 2, 2025 09:34
ESPHome config for Air Quality Sensor (ENS160+AHT20)
esphome:
name: air-quality
comment: "${device_description}"
friendly_name: Air Quality
substitutions:
device_description: "Air Quality Sensor (ENS160+AHT20)"
device_name: "air-quality"
ens160_update_interval: "100s"
aht20_update_interval: "60s"
@karen-kua
karen-kua / index.js
Last active September 28, 2022 02:31
Lambda@Edge function for accessing React apps in different sub-directories
exports.handler = (event, context, callback) => {
// Get the request object.
const request = event.Records[0].cf.request;
// Get the host from the request and take out "www." from the host if it exists.
let host = request.headers.host[0].value;
host = host.replace(/^www\./, "");
// Check if the host contains a subdomain.

Meltdown fix impact on Redis performances in virtualized environments

UPDATE: apparently kernel difference may have a serious impact, so I'll redo the test from scratch.

Test performed with AOF enabled, fsync policy 1 second, allowing the rewrites to be triggered.

Command lines used:

@derekcollison
derekcollison / gist:4616831fc476e5f2117e
Created December 3, 2015 18:03
NATS Performance with 16 publishers
~/Development/go/src/github.com/nats-io/nats/examples> ./nats-bench -np 16 -n 100000 foo ok
Starting benchmark
msgs=16X100000, pubs=16, subs=0
#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
// junkterm is a quick and dirty serial terminal.
package main
import (
"io"
"log"
"os"
"github.com/pkg/term"
"github.com/spf13/cobra"