I hereby claim:
- I am rduque1 on github.
- I am rduque (https://keybase.io/rduque) on keybase.
- I have a public key ASDg8ZS6be0hPAukKONJvnaF-nUbVO3ICr7R_EQeqtUUvQo
To claim this, I am signing this object:
| # https://serverfault.com/questions/843296/how-to-expose-the-docker-api-over-tcp | |
| ncat -lknvp 2375 -c "ncat -U /var/run/docker.sock" |
| start=$(date -d "-10 day" +%Y%m%d); | |
| end=$(date -d"-1 day" +%Y%m%d); | |
| while [[ $start -le $end ]]; | |
| do | |
| tmpEnd=$(date -d"$start + 1 day" +"%Y%m%d"); | |
| echo $(date -d $start +%Y-%m-%d) $(date -d $tmpEnd +%Y-%m-%d); | |
| docker run -it --rm \ | |
| --network asrm-202201_default \ | |
| influxdb:2.0-alpine influx query \ | |
| --host http://influxdb:8086 --token $TOKEN --org $ORG \ |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * @fileoverview Pearson correlation score algorithm. | |
| * @author matt.west@kojilabs.com (Matt West) | |
| * @license Copyright 2013 Matt West. | |
| * Licensed under MIT (http://opensource.org/licenses/MIT). | |
| */ | |
| /** | |
| * Calculate the person correlation score between two items in a dataset. |
| #!/usr/bin/env bash | |
| set -x | |
| ls -l $1 | |
| filename=$1 | |
| if [ "$filename" == "*.vcf.gz" ]; then | |
| gunzip $1 | |
| filename=${filename/'.gz'/''} | |
| fi | |
| if [ ! -f $filename ]; then |
Use docker inspect is different in swarm mode and normal mode if you wnat to use it in swarm mode:
Manager nodes: use this command for services. (but if you want to see healthceck logs of specific container see worker nodes section):
docker inspect --format "{{json .Spec.TaskTemplate.ContainerSpec.Healthcheck }}" hinava_dashboard |jqWorker nodes:
you should use complete name of the container that completed with <tab> key
docker inspect hinava_filebeat.1.umvobmm9wrjdz1b08y5jibvl2 | grep -B 10 -A 10 "health"| aws s3 rb s3://bucket-name --force |
| #!/bin/bash | |
| # Flushing all rules | |
| iptables -F FORWARD | |
| iptables -F INPUT | |
| iptables -F OUTPUT | |
| iptables -X | |
| # Setting default filter policy | |
| iptables -P INPUT DROP | |
| iptables -P OUTPUT DROP | |
| iptables -P FORWARD DROP |
| // https://stackoverflow.com/questions/8009664/how-to-split-a-delimited-string-into-an-array-in-awk | |
| awk ' | |
| BEGIN { | |
| split("X,Y,MT", parts, ","); | |
| for (i in parts) chrs[parts[i]]="" | |
| } | |
| { | |
| gt=-1; | |
| split($10, a, ":"); | |
| split($5, alts, ","); |
| for id in `(cat toDel.txt)`; do echo "aws --profile wasabi s3 --endpoint-url=<endpoint> rm --recursive s3://<bucket>/id_$id/"; done |