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 | |
if [ ! $1 ]; then | |
echo " Example of use: $0 database_name [dir_to_store]" | |
exit 1 | |
fi | |
db=$1 | |
out_dir=$2 | |
if [ ! $out_dir ]; then | |
out_dir="./" |
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 | |
VERSION=$(unzip -q -c "$1" META-INF/MANIFEST.MF | grep "Implementation-Version:" | awk '{print $2}' | sed 's/["\n\r]//g') | |
printf "%s" "$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
#!/bin/bash | |
# Example - to set the logs retention policy for your default AWS account in region eu-west-1 to 5 days, execute the command: | |
# set-retention.sh default eu-west-1 5 | |
export AWS_PROFILE=$1 | |
export AWS_REGION=$2 | |
RETENTION_DAYS=${3:-30} | |
echo "AWS_PROFILE=$AWS_PROFILE, AWS_REGION=$AWS_REGION, RETENTION_DAYS=$RETENTION_DAYS" | |
while read -r i; | |
do (aws logs put-retention-policy --region "$AWS_REGION" --log-group-name "$i" --retention-in-days "$RETENTION_DAYS" ); | |
done < <(aws logs describe-log-groups --region "$AWS_REGION" --query 'logGroups[*].[logGroupName]' | grep / | sed 's/"//g') |
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 | |
# Example - to read the logs retention policy for your default AWS account in region eu-west-1, execute the command: | |
# read-retention.sh default eu-west-1 | |
export AWS_PROFILE=$1 | |
export AWS_REGION=$2 | |
echo "AWS_PROFILE=$AWS_PROFILE, AWS_REGION=$AWS_REGION" | |
while read -r i; | |
do (printf "%s: " "$i" && aws logs describe-log-groups --region "$AWS_REGION" --log-group-name-prefix "$i" --query 'logGroups[0].retentionInDays'); | |
done < <(aws logs describe-log-groups --region "$AWS_REGION" --query 'logGroups[*].[logGroupName]' | grep / | sed 's/"//g') |
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 | |
export AWS_PROFILE=$1 | |
export AWS_REGION=$2 | |
echo "AWS_PROFILE=$AWS_PROFILE, AWS_REGION=$AWS_REGION" | |
aws logs --region "$AWS_REGION" describe-log-groups --query 'logGroups[*].[logGroupName]' | grep / | sed 's/"//g' |
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
# Delete every non-running Docker container | |
docker rm -f $(docker ps -a -q) | |
# Delete every Docker image for non-running containers | |
docker rmi -f $(docker images -q) |
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> | |
... | |
<build> | |
<plugins> | |
... | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.6.1</version> | |
<configuration> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder