Skip to content

Instantly share code, notes, and snippets.

View webwurst's full-sized avatar

Tobias Bradtke webwurst

View GitHub Profile
#
# Ce fichier de configuration Logstash permet d'effectuer la copie d'index soit:
# - à l'intérieur d'un même cluster Elasticsearch
# - entre différents clusters Elasticsearch
#
# Utile dans le cas où nous voulons réindexer un index à l'aide de nouveaux mappings ou pour
# dupliquer la production vers un autre environnement de tests.
#
# Pour invoquer la commande:
# LS_HEAP_SIZE="2048m" /path/to/bin/logstash -w 2 -f copie-elasticsearch.conf
{
"template" : "ul-*",
"order" : 90,
"settings" : {
"index" : {
"refresh_interval" : "-1",
"number_of_replicas" : "0"
}
}
}
@djmaze
djmaze / keybase.md
Created February 12, 2016 11:09
keybase.md

Keybase proof

I hereby claim:

  • I am djmaze on github.
  • I am djmaze (https://keybase.io/djmaze) on keybase.
  • I have a public key ASDLM7YHADRbPM4VIBahe0KR1qQU0lJ0Oa7CHE2BDK4YHAo

To claim this, I am signing this object:

@yoanisgil
yoanisgil / docker-compose.yml
Last active October 1, 2018 12:10
Elastic Search - Docker Compose
master:
image: elasticsearch:2
ports:
- "9200:9200"
restart: always
container_name: es_master
es-node:
image: elasticsearch:2
command: elasticsearch --discovery.zen.ping.unicast.hosts=es_master

Cheat sheet for callable entities in ES6

Value:

FD FE AF C M
Function-callable ×
Constructor-callable × ×
Prototype F.p F.p F.p SC F.p
Property prototype × ×
@Air-Craft
Air-Craft / ffmpeg_from_m3u_stream.sh
Created December 24, 2015 13:29
Rip m3u8 stream (series of .ts files) to video via ffmpeg #video #conversion #streaming #ripping
ffmpeg -i "https://content.jwplatform.com/manifests/Wqyolfwt.m3u8" -c copy -bsf:a aac_adtstoasc video.mp4
@krichardsson
krichardsson / pomodoro.coffee
Last active November 24, 2016 00:20
Dashing pomodoro widget
class Dashing.Pomodoro extends Dashing.Widget
ready: ->
setInterval(@startCountdown, 500)
startCountdown: =>
current_timestamp = Math.round(new Date().getTime()/1000)
end = parseInt($(@node).find("#pomodoro-end-time").html())
end_timestamp = Math.round(end / 1000)
seconds_until_end = end_timestamp - current_timestamp
#!/bin/bash -xv
### Country list
# CHANGE WITH YOUR COUNTRIES
COUNTRIES="europe/france/guadeloupe europe/france/guyane europe/france/mayotte europe/france/martinique europe/france/reunion europe/france"
# SMALL SUBSET FOR TESTING:
COUNTRIES="europe/france/guyane europe/france/mayotte"
NOMINATIM="/var/www/Nominatim"
cd $NOMINATIM/data
@djmaze
djmaze / example.sh
Created September 28, 2015 20:43
Running Docker inside docker
root@host $ docker run --privileged -d --name dockerd docker:dind
root@host $ docker run -it --rm --link dockerd:docker ubuntu bash
root@container $ apt-get update && apt-get -y install docker.io
root@container $ DOCKER_HOST="docker:2375" docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
@djmaze
djmaze / instructions.sh
Last active January 31, 2017 00:01
Docker w/GlusterFS volume driver on Scaleway C1 servers
# 0. For the server, use the "Docker" base image from the ImageHub (https://www.scaleway.com/de/imagehub/docker/)
# 1. Install https://github.com/calavera/docker-volume-glusterfs
# Alternatively, just download the prebuilt executable from https://gobuilder.me/get/github.com/calavera/docker-volume-glusterfs/docker-volume-glusterfs_master_linux-arm.zip
apt-get -y install golang
export GOPATH=~/go
go get github.com/calavera/docker-volume-glusterfs
mv go/bin/docker-volume-glusterfs /usr/local/bin/
# 2. Install GlusterFS