Skip to content

Instantly share code, notes, and snippets.

CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french );
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING
FOR hword, hword_part, word WITH unaccent, french_stem;
CREATE TEXT SEARCH CONFIGURATION en ( COPY = english );
ALTER TEXT SEARCH CONFIGURATION en ALTER MAPPING
FOR hword, hword_part, word WITH unaccent, english_stem;
CREATE TEXT SEARCH CONFIGURATION de ( COPY = german );
ALTER TEXT SEARCH CONFIGURATION de ALTER MAPPING
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@josegonzalez
josegonzalez / access.lua
Created December 3, 2012 18:26
Simple lua file enabling oauth support for nginx via nginx-lua and access_by_lua.
- certain endpoints are always blocked
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then
ngx.exit(403)
end
-- import requirements
local cjson = require "cjson"
-- setup some app-level vars
local app_id = "APP_ID"