Skip to content

Instantly share code, notes, and snippets.

View SaveTheRbtz's full-sized avatar

Alexey Ivanov SaveTheRbtz

View GitHub Profile
@SaveTheRbtz
SaveTheRbtz / transcript.txt
Created April 25, 2023 03:50
gpt-4 sci-fi reccomendations
Alexey Ivanov
Can you give me an advice on what sci-fi books I would read? Here is the list of things that I've enjoyed (i've also marked favorites):
* Cryptonomicon (favorite)
* Snow Crash
* Diamond Age
* Bobiverse series (favorite)
* Ciaphas Cain series
* Foundation series
* He Who Fights with Monsters series
* Kingkiller Chronicle
@SaveTheRbtz
SaveTheRbtz / keybase.md
Created December 28, 2021 07:16
keybase.md

Keybase proof

I hereby claim:

  • I am savetherbtz on github.
  • I am savetherbtz (https://keybase.io/savetherbtz) on keybase.
  • I have a public key ASBGVaV7YtaCOt3iI1SH9JZJY-ICJJhAZ3kX7FHex9GpQgo

To claim this, I am signing this object:

@SaveTheRbtz
SaveTheRbtz / choices_pb2.py
Last active September 28, 2021 15:46
DEG2021
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: choices.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
diff --git a/source/common/upstream/load_balancer_impl.cc b/source/common/upstream/load_balancer_impl.cc
index 185652b66..09816b0cf 100644
--- a/source/common/upstream/load_balancer_impl.cc
+++ b/source/common/upstream/load_balancer_impl.cc
@@ -1,7 +1,10 @@
#include "common/upstream/load_balancer_impl.h"
+#include <algorithm>
#include <cstdint>
+#include <limits>
@SaveTheRbtz
SaveTheRbtz / affinitize.py
Last active December 25, 2020 03:57
affinitization scripts, originally written by @behebot
#!/usr/bin/env python
# mypy: allow-untyped-defs
"""
This script is used for applying affinity settings for various hardware devices.
Script originally based on Intel's [set_irq_affinity.sh](https://gist.github.com/SaveTheRbtz/8875474).
Over the years it was updated with heuristics based on the shape of Dropbox infrastructure.
Currently, this script can manage IRQ affinities, RPS, XPS, and RXQS. For the description of
commit 9ed0fd60880a7359db62605f6f8a578f621e6326
Author: Alexey Ivanov <[email protected]>
Date: Sat Oct 12 16:55:05 2019 +0000
[DBX] net-tcp_bbr: v2: disable spurious warning
This warning is due to the fact that tcp_simple_retransmit() calls
tcp_set_ca_state(sk, TCP_CA_Loss);
@SaveTheRbtz
SaveTheRbtz / lockstat.py
Last active April 10, 2024 15:20
eBPF-based lock profiling tool inspired by lockstat(1M)
#!/usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2017 Sasha Goldshtein
Copyright (c) 2018 Alexey Ivanov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/core/malloc.c b/src/core/malloc.c
index 32c20353..83f3e980 100644
--- a/src/core/malloc.c
+++ b/src/core/malloc.c
@@ -98,7 +98,7 @@ size_t freemem;
*
* Currently fixed at 512kB.
*/
-#define HEAP_SIZE ( 512 * 1024 )
+#define HEAP_SIZE ( 4 * 1024 * 1024 )
@SaveTheRbtz
SaveTheRbtz / edgemap-log.txt
Last active August 7, 2018 22:13
Edge Location Preference computation
Loaded airports: 1035
Loaded GDPs: 209
Loaded cities: 25032
Top cities:
City(name='tokyo', country='jp', population=31480498, gdppc=34523.7007742331, latlong=(35.685, 139.751389), region='40')
City(name='new york', country='us', population=8107916, gdppc=56115.7184261955, latlong=(40.7141667, -74.0063889), region='NY')
City(name='london', country='gb', population=7421228, gdppc=43929.6908131028, latlong=(51.514125, -0.093689), region='H9')
City(name='seoul', country='kr', population=10323448, gdppc=27221.5240509661, latlong=(37.5985, 126.9783), region='11')
City(name='sydney', country='au', population=4394585, gdppc=56290.6468086817, latlong=(-33.861481, 151.205475), region='02')
City(name='los angeles', country='us', population=3877129, gdppc=56115.7184261955, latlong=(34.0522222, -118.2427778), region='CA')
@SaveTheRbtz
SaveTheRbtz / set_qdisc.sh
Last active January 8, 2022 17:45
mq+fq
#!/bin/bash -ue
# Sets up mq+$shed combo for given interface.
if [ $# -ne 2 ] || [ -z "$1" ] || [ -z "$2" ]; then
echo "usage: $0 interface scheduler" >&2
echo " e.g: $0 eth0 fq" >&2
echo " e.g: $0 eth0 pfifo_fast" >&2
exit 64 # EX_USAGE
fi