This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.provision "docker" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
E=$(docker ps -aq --filter "name=mvn_repository") | |
docker ps -aq | grep -v ${E:-lookup_failed} | xargs docker rm -f | |
docker images | sed -E 's/ +/ /g' | grep "^<none> <none>" | cut -d ' ' -f 3 | xargs docker rmi -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<!-- | |
Simple demo project demonstrating the usage of rhuss/docker-maven-plugin | |
--> | |
<groupId>com.github.mgurov</groupId> | |
<artifactId>docker-maven-runs</artifactId> | |
<version>0.0.1</version> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '{print toupper(substr($0,1,1)) substr($0,2) }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
# Wait for port to get available | |
LOOPS="1000" | |
PORT=$1 | |
i=0 | |
while ! nc localhost $PORT >/dev/null 2>&1 < /dev/null; do | |
i=`expr $i + 1` | |
if [ $i -ge $LOOPS ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wport() { | |
lsof -n -i4TCP:$1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profile> | |
<id>skipTests</id> | |
<properties> | |
<skipTests>true</skipTests> | |
</properties> | |
</profile> | |
<profile> | |
<id>dontGenerateBackupPoms</id> | |
<properties> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
shopt -s nullglob | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | |
while true; do | |
files=( x* ) | |
if (( ${#files[@]} )); then | |
echo file found: $files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
nspname || '.' || relname as "relation", | |
pg_size_pretty( | |
pg_relation_size(C.oid) | |
) as "size", | |
to_char(round( pg_relation_size(C.oid) /( | |
select | |
sum( pg_relation_size( C.oid ) ) as "totalsize" | |
from | |
pg_class C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
CONTEXT=pro | |
APP=purple | |
exec 3< <( | |
pgid=$! | |
echo "kill $pgid" | |
kubectl --context=${CONTEXT} --namespace=${APP} port-forward ${APP}-${APP}-db-0 :5432 | |
) |