Skip to content

Instantly share code, notes, and snippets.

Avatar

Antonio Villegas avillegasn

View GitHub Profile
@mkjsix
mkjsix / set-retention.sh
Last active Jan 31, 2020
Set retention policies for AWS CloudWatch Log Groups, for a profile and a region
View set-retention.sh
#!/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')
View 01-gulpfile.js
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
You can’t perform that action at this time.