Set the following properties in RDS:
log_min_duration_statement = 250
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
log_autovacuum_min_duration = 0
SELECT s.pid, s.ssl, s.version, a.client_addr, a.usename, a.datname, a.query | |
FROM pg_stat_ssl AS s | |
JOIN pg_stat_activity AS a ON a.pid = s.pid; | |
-- You can see `t|f` in `ssl` field |
/* | |
* https://stackoverflow.com/a/13591754/31493 | |
*/ | |
function onOpen() { | |
// get active spreadsheet | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
// create menu | |
var menu = [{name: "Hide columns", functionName: "hideColumns"}, |
while true; do | |
date -Isec | sed -e 's/+00:00//' | tr '\n' ' ' | |
pg_isready -h YOUR_RDS_INSTANCE.rds.amazonaws.com -U USER -d DB_NAME | |
sleep 1 | |
done | tee connection-test-$(date -Imin).log |
# Dockerfile for a multi-stage build of a Ruby app which needs Node at build time | |
# | |
# Thanks to https://github.com/gomex for sharing | |
FROM ruby:2.5.1 as builder | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - &&\ | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list |
# gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate's text-to-speech API | |
# https://github.com/pndurette/gTTS | |
pipsi install gTTS | |
sudo apt install mpg123 | |
say() { | |
gtts-cli "$@" | mpg123 - | |
} |
# Show timestamp for history output | |
export HISTTIMEFORMAT="%d/%m/%y %T " |
log_min_duration_statement = 250
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
log_autovacuum_min_duration = 0
# `docker stats` in Docker 17.06.2, used in ECS at the moment, shows container IDs instead of names | |
# see https://github.com/moby/moby/issues/20973 | |
docker stats $(docker ps --format={{.Names}}) |
<details> <summary>How do I dropdown?</summary> <br> This is how you dropdown.