Skip to content

Instantly share code, notes, and snippets.

View alanwds's full-sized avatar

Alan Santos alanwds

  • Sensedia
  • Campinas/Brazil
View GitHub Profile
@qiangxue
qiangxue / cloudwatch_log_insights_mysql_slow_query_examples.md
Created October 20, 2020 19:28 — forked from grocky/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
@thomaslarsen
thomaslarsen / README.md
Last active February 20, 2024 20:12
Convert PEM certificate to JSON format
@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active December 25, 2023 02:53
AWS EBS - Find unused snapshots

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help