curl -X PUT -H 'Content-Type: application/json' localhost:9200/jaeger-span-*/_settings -d ' {
"index": {
"blocks": {
"read_only_allow_delete": "false"
}
}
}'
This file contains 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 | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains 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 | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains 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
apiVersion: monitoring.coreos.com/v1 | |
kind: PrometheusRule | |
metadata: | |
labels: | |
app: prometheus-operator | |
release: prometheus | |
name: alertmanager-flux | |
namespace: monitoring | |
spec: | |
groups: |
Version 1.
package main
import (
"context"
"fmt"
"os"
"os/signal"
At some point in your day to day hacking life, getting the Struct fields and values may come in handy.
package main
import (
"fmt"
"reflect"
)
This file contains 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
#!/usr/bin/env bash | |
set -o pipefail | |
set -o nounset | |
set -o errexit | |
IFS=$'\n\t' | |
function print_help { | |
echo "usage: $0 [options] <cluster-name>" |
ctr=0
max_retries=10
while [ {{condition}} ]; do
ctr=`expr $ctr + 1`
sleep 5
if [ $ctr == $max_retries ]; then
echo "max retries ($max_retries) reached"
exit 1
fi
This file contains 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
hello | |
world | |
dog | |
cat | |
fish | |
car | |
golang |
alias clear-dns-cache='sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache;say MacOS DNS cache has been cleared, Sir JB'
# Liferay Hacks
export LR_DATE=${LR_DATE:-$(date +%Y-%m-%d)}
export LR_HOME=/Users/john.bryan.j.sazon/Servers/liferay/liferay-dxp-digital-enterprise-7.0-sp4
export LR_TOMCAT_HOME=/Users/john.bryan.j.sazon/Servers/liferay/liferay-dxp-digital-enterprise-7.0-sp4/tomcat-8.0.32
NewerOlder