Skip to content

Instantly share code, notes, and snippets.

@mhicauber
mhicauber / gist:f7a9fb80d495709f2b47133ac03a24af
Created July 19, 2023 08:38
Useful monitoring commands. Java/docker/wildfly
View gist:f7a9fb80d495709f2b47133ac03a24af
# Java flight recording snapshot :
docker exec <containerID> jcmd <java PID inside container> JFR.start name=monitor30m maxage=30m maxsize=250M
# Dump will be stored in container app root path (/opt/jboss/***.jfr in my case) after 30m
# If you want to stop it before maxage time :
docker exec <containerID> jcmd <java PID inside container> JFR.stop name=monitor30m filename=/tmp/debugrun1.jfr
# JFR file can be analyser with Oracle Java Mission Control
@mhicauber
mhicauber / pgsql-find-create-missing-indexes.sql
Created July 17, 2023 10:41 — forked from jonasraoni/pgsql-find-create-missing-indexes.sql
PostgreSQL SELECT statement to find/create foreign keys that are missing indexes
View pgsql-find-create-missing-indexes.sql
-- find missing indexes
SELECT
conrelid::regclass, conname, reltuples::bigint
FROM
pg_constraint
JOIN pg_class
ON conrelid = pg_class.oid
WHERE
contype = 'f'
AND NOT EXISTS (
@mhicauber
mhicauber / pgsql-find-create-missing-indexes.sql
Created July 17, 2023 10:41 — forked from jonasraoni/pgsql-find-create-missing-indexes.sql
PostgreSQL SELECT statement to find/create foreign keys that are missing indexes
View pgsql-find-create-missing-indexes.sql
-- find missing indexes
SELECT
conrelid::regclass, conname, reltuples::bigint
FROM
pg_constraint
JOIN pg_class
ON conrelid = pg_class.oid
WHERE
contype = 'f'
AND NOT EXISTS (
@mhicauber
mhicauber / Dockerfile
Created December 12, 2018 20:10
OSRM Prebuilt Dockerfile
View Dockerfile
FROM osrm/osrm-backend:v5.20.0
RUN apk --no-cache add curl
RUN mkdir /data
RUN curl http://download.geofabrik.de/europe/bretagne-latest.osm.pbf > /data/bretagne-latest.osm.pbf
RUN osrm-extract -p /opt/car.lua /data/bretagne-latest.osm.pbf
RUN osrm-contract /data/bretagne-latest.osrm