This file contains 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 -x | |
version=$1 | |
git checkout v${version} && mvn -s .settings.xml clean install -P docs -DskipTests -pl docs && /tmp/ghpages.sh -v ${version} -d ~/repo/all-cloud/spring-cloud-static && git reset --hard |
This file contains 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
#!/usr/bin/env bash | |
source common.sh || source scripts/common.sh || echo "No common.sh script found..." | |
set -e | |
function print_usage() { | |
cat <<EOF | |
USAGE: | |
You can use the following options: |
This file contains 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 | |
# From within a (bash) script you need to use double quotes instead of singel qoutes to expand the variable | |
newAddress="org.springframework.cloud.contract.verifier.dsl" | |
oldAddress="org.springframework.cloud.contract.spec" | |
repo="$HOME/repo/accurest" | |
currentDir=`pwd` | |
cd $repo |
This file contains 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
def cli = new CliBuilder(usage:'[options]', header:'Options:') | |
cli.with { | |
h longOpt: 'help', 'print this message' | |
p longOpt: 'pom', args:1, argName:'file', 'Path to POM file to change (required)' | |
v longOpt: 'version', args:1, argName:'version', 'Version of parent to use (required)' | |
} | |
def options = cli.parse(args) | |
if (!options) { | |
return | |
} |
This file contains 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
#Enable the Remote API on a New Socket | |
# create file to make Docker available on a TCP socket on port 2375. | |
touch /etc/systemd/system/docker-tcp.socket | |
cat > /etc/systemd/system/docker-tcp.socket <<EOF | |
[Unit] | |
Description=Docker Socket for the API |
This file contains 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
# Stop, remove containers/images | |
docker --tlsverify=false stop $(docker --tlsverify=false ps -a -q) | |
docker --tlsverify=false kill $(docker --tlsverify=false ps -a -q) | |
docker --tlsverify=false rm $(docker --tlsverify=false ps -a -q) | |
docker --tlsverify=false rmi $(docker --tlsverify=false images -q) -f | |
docker volume ls -qf dangling=true | xargs -r docker volume rm | |
docker volume rm $(docker volume ls -qf dangling=true) |
This file contains 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
docker kill $(docker ps -q) |
This file contains 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 | |
NUMBER_OF_LINES_TO_LOG=200 | |
docker ps | sed -n '1!p' > /tmp/containers.txt | |
while read field1 field2 field3; do | |
echo -e "\n\nContainer name [$field2] with id [$field1] logs: \n\n" | |
docker logs --tail=$NUMBER_OF_LINES_TO_LOG -t $field1 | |
done < /tmp/containers.txt |
This file contains 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
/* http://superuser.com/questions/330830/how-to-turn-web-pages-in-browser-into-black-white-grayscale */ | |
body { | |
/* IE */ | |
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | |
/* Chrome, Safari */ | |
-webkit-filter: grayscale(1); | |
/* Firefox */ |
This file contains 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
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |