Skip to content

Instantly share code, notes, and snippets.

View revolunet's full-sized avatar
🐫
Killing bugz

Julien Bouquillon revolunet

🐫
Killing bugz
View GitHub Profile
@zackad
zackad / nextjs.conf
Created July 1, 2020 10:39
NGINX server configuration for nextjs static generated site.
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
location ~ /.+ {
try_files $uri $uri.html $uri =404;
}
@back-2-95
back-2-95 / docker-compose.override.yml
Last active July 5, 2020 13:20
Local development support for Traefik v1 and v2 in the same project
version: '3.7'
services:
app:
labels:
# Traefik 2 labels, note that I point to container_name of app service with ${COMPOSE_PROJECT_NAME}-app.
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${APP_HOSTNAME}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true"
@webdeb
webdeb / Hasura Keycloak.md
Last active October 29, 2022 19:03
Basic Keycloak Script Mapper to provide Hasura claims

Steps to provide Hasura Claims in Keycloak generated JWT

  1. Create your realm / client
  2. Inside client configuration go to "Mappers"
  3. Click on "Create"
  4. Name it "hasura"
  5. Choose Mapper Type "Script Mapper"
  6. Add following script to demonstrate how it works

Backup

ssh [user]@[ip]
cd [server_project_path]
docker-compose exec -T db pg_dump -U [db_user] -Fc [db_name] -f /[file].dump
docker ps
@robertrossmann
robertrossmann / all-indexes.sql
Last active January 26, 2024 03:00
Postgres diagnostics
-- List all existing indexes and include some useful info about them (incl. the index's definition)
SELECT
schemaname AS schemaname,
t.relname AS tablename,
ix.relname AS indexname,
regexp_replace(pg_get_indexdef(i.indexrelid), '^[^\(]*\((.*)\)$', '\1') AS columns,
regexp_replace(pg_get_indexdef(i.indexrelid), '.* USING ([^ ]*) \(.*', '\1') AS algorithm,
indisunique AS UNIQUE,
indisprimary AS PRIMARY,
@ivangabriele
ivangabriele / post-receive
Last active August 22, 2021 14:16
Github Post Receive Hook
#!/bin/bash
# Exit when any command fails:
set -e
TARGET="/home/.../deployments/matomo"
GIT_DIR="/home/.../repositories/matomo.git"
BRANCH="main"
while read oldrev newrev ref
@adamrdavid
adamrdavid / db_guidelines.md
Last active July 14, 2023 13:03
the darndest things
@Mohitsharma44
Mohitsharma44 / .piwall
Created November 8, 2018 04:01
center vizwall piwall configuration
[centervizwall]
width=190
height=66
x=0
y=0
# Corresponding tile definitions
[vizwall-00]
wall=centervizwall
width=37
@FGRibreau
FGRibreau / cors-nginx.conf
Last active May 26, 2020 11:06 — forked from alexjs/cors-nginx.conf
Slightly tighter CORS config for nginx
#
# Slightly tighter CORS config for nginx
#
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs
#
# Despite the W3C guidance suggesting that a list of origins can be passed as part of
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox)
# don't seem to play nicely with this.
#
@bmaupin
bmaupin / open-source-sso.md
Last active April 11, 2024 09:36
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes