Skip to content

Instantly share code, notes, and snippets.

lzrikate.com
xfyyveifirnll.com
jipo.io
puscxnhsksnunxs.com
weodaecdcuny.xyz
jsiwjgnq.com
refpaiwqkk.top
bjqdycewiefkyr.com
eoqocart.com
gme-trking.com
@MaxenceG2M
MaxenceG2M / els-update.es
Created July 30, 2021 20:32
Elasticsearch requests to do rolling update
PUT /_settings
{
"index": {
"number_of_replicas": 1
}
}
// https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html
PUT _cluster/settings
@MaxenceG2M
MaxenceG2M / gist:2eb6541e29ac0d075338b884e8873b6d
Created July 20, 2016 21:14 — forked from zikani03/gist:7c82b34fbbc9a6187e9a
Simple Cors Filter for Spark Java
import java.util.HashMap;
import spark.Filter;
import spark.Request;
import spark.Response;
import spark.Spark;
/**
* Really simple helper for enabling CORS in a spark application;
*/
public final class CorsFilter {
@MaxenceG2M
MaxenceG2M / dockerClean.sh
Last active March 9, 2023 03:07
Bash script to clean docker: stop all containers, rm all container, rmi dangling images
#!/bin/bash
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Usage method
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usage() {
echo "
Usage : $0 [options]
Clean old docker containers, volumes, etc.