Skip to content

Instantly share code, notes, and snippets.

View jll90's full-sized avatar

Nicola Luongo jll90

View GitHub Profile
@jll90
jll90 / Dockerfile
Created December 24, 2020 01:50
Lua Nginx Module Authorization Dockerfile nginx
FROM fabiocicerchia/nginx-lua
COPY ./nginx.conf /etc/nginx/nginx.conf
RUN mkdir /etc/nginx/conf.d
RUN mkdir /etc/nginx/lua
COPY lua/. /etc/nginx/lua
CMD [ "nginx", "-g", "daemon off;" ]
@jll90
jll90 / nginx.conf
Last active December 24, 2020 02:24
Lua Nginx Module Authorization nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
@jll90
jll90 / auth.lua
Last active December 24, 2020 02:12
Lua Nginx Module Authorization auth.lua
function parseAuthHeader(headers)
local authHeader = headers['Authorization']
if authHeader == nil then
return nil
end
return string.match(authHeader, "Bearer%s(%a+)")
end
function write403Message ()
@jll90
jll90 / install.sh
Created September 7, 2021 14:38
Elixir Language Server Installation
cd ## change to home directory
git clone [email protected]:elixir-lsp/elixir-ls.git .elixir-ls
cd .elixir-ls
mkdir release
mix deps.get && mix compile
mix elixir_ls.release -o release
## language server lives in
## ~/.elixir-ls/release/language_server.sh