Skip to content

Instantly share code, notes, and snippets.

View rsilva4-zz's full-sized avatar

Ruben Silva rsilva4-zz

View GitHub Profile
#!/bin/bash
# **README**
#1. Copy script on Amazon EC2 Linux instance with AWS CLI configured, and psql client installed with accessibility to RDS/Aurora Postgres instance
#2. Make script executable: chmod +x pg_health_check.sh
#3. Run the script: ./ pg_health_check.sh
#4. It will take around 2-3 mins to run (depending on size of instance), and generate html report: <Database identifier>_report_<date>.html
#5. Share the report with your AWS Technical Account Manager
#################
# Author: Vivek Singh, Postgres Specialist Technical Account Manager, AWS
# V-13 : 4/10/2020
@rsilva4-zz
rsilva4-zz / groovy_unirest_object_mapper.groovy
Last active March 30, 2016 14:49
Groovy Unirest ObjectMapper
Unirest.setObjectMapper(new ObjectMapper() {
JsonSlurper jsonSlurper = new JsonSlurper()
public <T> T readValue(String value, Class<T> valueType) {
try {
return jsonSlurper.parseText(value)
} catch (e) {
throw new RuntimeException(e);
}
}