Skip to content

Instantly share code, notes, and snippets.

@gszr
gszr / gist:108abd44063086a19cb0e171d9c6a3f3
Created March 21, 2024 20:59
openrgb -vv --gui --loglevel 6
$ openrgb -vv --gui --loglevel 6
Parsing CLI option: --gui
Parsing CLI option: --loglevel
Loglevel set to 6
Attempting to connect to local OpenRGB server.
Connection attempt failed
Local OpenRGB server unavailable.
Running standalone.
[ResourceManager] Calling detection start callbacks.
[ResourceManager] Calling detection progress callbacks.
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.8.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230801"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130201
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24200
https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#ngxrematch
```
Specify options to control how the match operation will be performed. The following option characters are supported:
a anchored mode (only match from the beginning)
d enable the DFA mode (or the longest token match semantics).
this requires PCRE 6.0+ or else a Lua exception will be thrown.
first introduced in ngx_lua v0.3.1rc30.
@gszr
gszr / readme.md
Created April 5, 2024 14:33
lua-protobuf issue

Before

(kong-dev) kong $ luarocks install lua-protobuf 0.5.0 CC=/usr/bin/gcc CFLAGS="-O2 -fPIC -fstrict-aliasing -Wstrict-aliasing=2"              master
Installing https://luarocks.org/lua-protobuf-0.5.0-1.src.rock

lua-protobuf 0.5.0-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
/usr/bin/gcc -O2 -fPIC -fstrict-aliasing -Wstrict-aliasing=2 -I/home/gs/code/work/kong/bazel-bin/build/kong-dev/openresty/luajit/include/luajit-2.1 -c pb.c -o pb.o
In file included from pb.c:11:
pb.h: In function ‘pb_nexttype’:
@gszr
gszr / KongMemUsage.md
Last active April 8, 2024 18:33
Kong Memory Usage

Some notes on Kong memory usage

As I was tweaking the Kong config I use in my VPS, I took the opportunity to take some screenshots of the Kong container memory usage pattern. What follows is a brief summary of my findings.

The deployment is pretty small:

$ http :8001/services | jq '.data | length'
11

$ http :8001/routes | jq '.data | length'
Decoded before:
{
data = { {
application_context = {
application_id = "app_id",
developer_id = "dev_id",
organization_id = "org_id",
portal_id = "p_id",
product_version_id = "pv_id"
local inspect = require "inspect"
require("kong.globalpatches")({
cli = true,
})
local conf_loader = require "kong.conf_loader"
local DB = require "kong.db"
local conf = assert(conf_loader(TEST_CONF_PATH))