Skip to content

Instantly share code, notes, and snippets.

@mustache1up
mustache1up / log-http-headers.md
Created May 9, 2023 06:46 — forked from kaichao/log-http-headers.md
nginx: Log complete request/response with all headers

1. switch nginx image to openresty/openresty

2. add the following to server/location (/etc/nginx/conf.d/default.conf)

   set $req_header "";
   set $resp_header "";
   header_filter_by_lua_block{ 
      local h = ngx.req.get_headers();
      for k, v in pairs(h) do
         ngx.var.req_header = ngx.var.req_header .. k.."="..v.." ";
@mustache1up
mustache1up / luamacros_numpad_into_drumpad_for_ableton.lua
Last active April 22, 2024 06:56
Turning cheap USB numeric keyboard into 4x4 drum pad controller for Ableton with LuaMacros
-- assign logical name to macro keyboard
lmc_assign_keyboard('DRUMPADCONTROLLER');
-- alternatively, set the logical name to a specific keyboard
-- lmc_device_set_name('DRUMPADCONTROLLER', '295601EB')
-- list all devices
lmc_print_devices();
--keymapping: