Skip to content

Instantly share code, notes, and snippets.

@dbratanis
dbratanis / win10colors.cmd
Created March 29, 2019 12:02 — forked from mlocati/win10colors.cmd
ANSI Colors in standard Windows 10 shell
@echo off
cls
echo  STYLES 
echo ^<ESC^>[0m Reset
echo ^<ESC^>[1m Bold
echo ^<ESC^>[4m Underline
echo ^<ESC^>[7m Inverse
echo.
echo  NORMAL FOREGROUND COLORS 
echo ^<ESC^>[30m Black (black)
@dbratanis
dbratanis / cloudwatch_log_insights_mysql_slow_query_examples.md
Last active January 2, 2023 14:37 — forked from qiangxue/cloudwatch_log_insights_mysql_slow_query_examples.md
CloudWatch Log Insights query examples for MySQL slow query log.

Filtering queries

Find slowest write queries

parse @message /Query_time: (?<queryTime>.*?) Lock_time: (?<lockTime>.*?) Rows_sent: (?<rowsSent>.*?) Rows_examined: (?<rowsExamined>.*?)\s(?<query>.*?)$/
  | filter @message like /(?i)insert/
  | sort queryTime desc
  | limit 10
@dbratanis
dbratanis / bash_strict_mode.md
Created May 30, 2023 08:17 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation