Skip to content

Instantly share code, notes, and snippets.

@soumentrivedi
soumentrivedi / script
Created December 9, 2016 14:14
Kubernetes-Setup-Hack-Session-1
ID=$(uuidgen) && aws route53 create-hosted-zone --name k8s.testrun.dev --caller-reference $ID
aws s3api create-bucket --bucket k8s-testrun-dev-state-store --region eu-west-1
export NAME="firstcluster.cloud.dev.os.uk"
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 \
#!/bin/bash
export DOCKERCLOUD_APIKEY="YOUR-API-KEY"
export DOCKERCLOUD_USER="YOUR-USERNAME"
#Setup environment variables & aliases
if [ -z "$S3_BUCKET" ]; then
S3_BUCKET="S3-BUCKET-NAME"
fi
@soumentrivedi
soumentrivedi / gist:099d74840a4f06d81103
Created March 26, 2016 18:26
Unity Packages References
http://forum.unity3d.com/threads/useful-github-repos-for-unity.258224/
@soumentrivedi
soumentrivedi / change_owner.sql
Last active September 27, 2018 13:57
Steps to perform pg_dump on Postgresql RDS instance
alter schema schema_name1 owner to rds_superuser;
alter schema schema_name2 owner to rds_superuser;
\dn;
CREATE FUNCTION exec(text) returns text language plpgsql volatile AS $f$
BEGIN EXECUTE $1; RETURN $1; END; $f$;
SELECT exec('ALTER TABLE ' || quote_ident(s.nspname) || '.' || quote_ident(s.relname) || ' OWNER TO rds_superuser')
FROM (
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
soumentrivedi / hiera.yaml
Created May 27, 2015 06:46
Hiera Eyaml - Separate encryption keys for every puppet environment
---
:backends:
- eyaml
- yaml
:hierarchy:
- "nodes/%{::clientcert}"
- common
:yaml:
:datadir: /git_source/puppet/environments/%{::environment}/hieradata
@soumentrivedi
soumentrivedi / SonarQube-IssueLog
Last active August 29, 2015 14:17
SonarQube "coverage is set to 0% as no JaCoCo execution data has been dumped"
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
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>