Skip to content

Instantly share code, notes, and snippets.

soumentrivedi / change_owner.sql
Last active September 27, 2018 13:57
Steps to perform pg_dump on Postgresql RDS instance
View change_owner.sql
alter schema schema_name1 owner to rds_superuser;
alter schema schema_name2 owner to rds_superuser;
CREATE FUNCTION exec(text) returns text language plpgsql volatile AS $f$
SELECT exec('ALTER TABLE ' || quote_ident(s.nspname) || '.' || quote_ident(s.relname) || ' OWNER TO rds_superuser')
SELECT nspname, relname
FROM pg_class c JOIN pg_namespace n ON (c.relnamespace = n.oid)
WHERE nspname in ('schema_name1', 'schema_name2') AND
soumentrivedi / script
Created December 9, 2016 14:14
View script
ID=$(uuidgen) && aws route53 create-hosted-zone --name --caller-reference $ID
aws s3api create-bucket --bucket k8s-testrun-dev-state-store --region eu-west-1
export NAME=""
export KOPS_STATE_STORE="s3://k8s-testrun-dev-state-store"
$GOPATH/bin/kops create cluster \
--node-count 3 \
--zones eu-west-1a,eu-west-1b,eu-west-1c \
View DockerCloudNodes - AWS Autoregister
#Setup environment variables & aliases
if [ -z "$S3_BUCKET" ]; then
soumentrivedi / gist:099d74840a4f06d81103
Created March 26, 2016 18:26
Unity Packages References
View gist:099d74840a4f06d81103
soumentrivedi / hiera.yaml
Created May 27, 2015 06:46
Hiera Eyaml - Separate encryption keys for every puppet environment
View hiera.yaml
- eyaml
- yaml
- "nodes/%{::clientcert}"
- common
:datadir: /git_source/puppet/environments/%{::environment}/hieradata
soumentrivedi / SonarQube-IssueLog
Last active August 29, 2015 14:17
SonarQube "coverage is set to 0% as no JaCoCo execution data has been dumped"
View SonarQube-IssueLog
In a multi-project based maven build with relatively larger unit tests, one would be familiar with the requirements of memory parameters such as Xmx, XX:MaxPermSize, etc passed with MAVEN_OPTS or within surefire plugin.
This also comes to help with issues of Java Code Coverage (jacoco) when performing analysis in SonarQube. Recently during analysis with sonarqube and jacoco as coverage plugin, we have been observing that our CI builds pass unit test but certain sub-projects report "coverage is set to 0% as no JaCoCo execution data has been dumped" and 0% code coverage is reported in the sonarqube dashboard. We have been able to get around this problem by using the following code snippet at the root pom.xml level