Skip to content

Instantly share code, notes, and snippets.

View elasticjava's full-sized avatar

Holger Bartnick elasticjava

  • Germany - Berlin
View GitHub Profile
@elasticjava
elasticjava / Dockerfile
Last active November 7, 2018 04:09
tried to run Rocksdb under alpine linux inside Docker
FROM gliderlabs/alpine
RUN apk add --update git build-base linux-headers wget tar perl zlib zlib-dev bzip2 bzip2-dev && \
cd /tmp && \
wget https://gflags.googlecode.com/files/gflags-2.0-no-svn-files.tar.gz && \
tar -xzvf gflags-2.0-no-svn-files.tar.gz && \
cd gflags-2.0 && \
./configure && make && make install && \
cd /tmp && \
wget https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz && \
@elasticjava
elasticjava / bright
Last active August 29, 2015 14:24
dim all your connected shiny bright displays via bash comfortably after you checked that xbacklight really doesn't work on your hardware: use "bright" :-)
#!/usr/bin/env bash
# sets the brightness via xrandr on all connected displays
# requirement: {sudo apt-get update && sudo apt-get install x11-xserver-utils zenity}
# installation: copy "bright" to ~/bin/ and {chmod +x ~/bin/bright} it
# usage: "bright" without args shows a zenity scroll dialog using this script
# author: https://github.com/hbartnick 2015
function set_brightness {
for output in ${outputs[@]}; do
xrandr --output $output --brightness $1
@elasticjava
elasticjava / inner_not_nested.sh
Last active August 29, 2015 14:09
[FU issue 8483] nested_type in nested_type is not nested
curl -XDELETE "http://localhost:9200/test"
curl -XPUT "http://localhost:9200/test" -d'
{
"mappings": {
"searchdoc": {
"dynamic": "strict",
"dynamic_templates": [
{
"nested_du_title": {
@elasticjava
elasticjava / test_copy_to_and_dynamic_templates_with_nested_documents.sh
Created November 14, 2014 13:13
description of unexpected behaviour with copy_to and nested_types and dynamic_templates
curl -XDELETE "http://localhost:9200/test"
curl -XPUT "http://localhost:9200/test/"
# create strict mapping of nested in nested type with copy_to
curl -XPUT "http://localhost:9200/test/searchdoc_fix/_mapping" -d'
{
"searchdoc_fix": {
"dynamic": "strict",
"properties": {
"du": {