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/sh | |
set -e | |
# Script extract env vairables by prefix | |
# and passes as command arguments | |
cmd=${1} | |
shift | |
if [ "$cmd" = "" ] | |
then |
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
<cat access logs> | grep 'referer="' | awk '{print $15}' | sed -e 's|referer="<replace-with-grafana-url>/grafana/d/\(.*\)/\(.*\)?\(.*\)|\2|g' | sort | uniq | grep -v 'referer="' |
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 python3 | |
# run download rds log and extract slow queries | |
# usage example: | |
# ./get_rds_slow_queries.py --region eu-central-1 --rds-instance rds-instance-name --since 24 | |
import boto3 | |
import sys | |
import argparse | |
import datetime | |
import time |
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 | |
if [[ -z "$1" ]] | |
then | |
echo "docker file needs to be specified"; | |
fi | |
perl -p -e 's/\%([^%]+)\%/defined $ENV{$1} ? $ENV{$1} : "\${$1}"/eg' $1 > test | |
cat test |
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 | |
readonly TIME_OUT=1 | |
STATUS=1 | |
printf "Command: %s \n" $@ | |
#pass command | |
while [ "$STATUS" -ne 0 ] | |
do | |
"$@" | |
STATUS=$? |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>My FB Reactions Page</title> | |
<style> | |
html { | |
box-sizing: border-box; | |
width: 100%; |