This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SRC="http://foo:9200" | |
| DST="http://localhost:9200" | |
| curl -X POST "$DST/_reindex?pretty" -H 'Content-Type: application/json' -d' | |
| { | |
| "source": { | |
| "remote": { | |
| "host": "http://foo:9200" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "__inputs": [ | |
| { | |
| "name": "DS_PROMETHEUS", | |
| "label": "prometheus", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "prometheus", | |
| "pluginName": "Prometheus" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "__inputs": [ | |
| { | |
| "name": "DS_PROMETHEUS", | |
| "label": "prometheus", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "prometheus", | |
| "pluginName": "Prometheus" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule MyApp.MapUtils do | |
| @doc ~S""" | |
| Transform keys in a Map to atoms | |
| ## Examples | |
| iex> MyApp.Maputils.map_keys_to_atoms(%{"foo" => 1, "bar" => %{foo2: "2"}}) | |
| {bar: %{foo2: "2"}, foo: 1} | |
| """ | |
| def map_keys_to_atoms(map) when is_map(map) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM elixir:1.10 | |
| ENV \ | |
| PHX_VER=1.5.1 \ | |
| NODE_VER=12.x \ | |
| APP=/app HOME=/app \ | |
| PKGS="inotify-tools postgresql-client git" | |
| RUN groupadd -g 1000 appuser \ | |
| && useradd -r -u 1000 -g appuser appuser \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AUTH_KEY='CF AUTH TOKEN KEY' | |
| EMAIL_ADDRESS='CF email' | |
| DNS_ZONE_NAME='domain.name' | |
| DNS_RECORD_NAME="hola.domain.name" | |
| DNS_ZONE=$(curl -sX GET "https://api.cloudflare.com/client/v4/zones?name=${DNS_ZONE_NAME}" -H "Content-Type:application/json" -H "Authorization:Bearer ${AUTH_KEY}" -H "X-Auth-Email:${EMAIL_ADDRESS}" | jq -r '.result[0].id') | |
| DNS_RECORD=$(curl -sX GET "https://api.cloudflare.com/client/v4/zones/${DNS_ZONE}/dns_records?name=${DNS_RECORD_NAME}" -H "Content-Type:application/json" -H "Authorization:Bearer ${AUTH_KEY}" -H "X-Auth-Email:${EMAIL_ADDRESS}" | jq -r '.result[0].id') | |
| CURRENT_DNS_VALUE=$(curl -sX GET "https://api.cloudflare.com/client/v4/zones/${DNS_ZONE}/dns_records/${DNS_RECORD}" -H "Content-Type:application/json" -H "Authorization:Bearer ${AUTH_KEY}" -H "X-Auth-Email:${EMAIL_ADDRESS}" | jq '.result["content"]') | |
| CURRENT_IP_ADDRESS=$(curl -s ip.me) |
OlderNewer