| created | tags | aliases | week | year | ||
|---|---|---|---|---|---|---|
| <% tp.file.creation_date("YYYY-MM-DD HH:mm") %> | 
 | 
 | <% tp.date.now("YYYY-[W]ww", 0, tp.file.title, "[W]ww") %> | <% tp.date.now("YYYY", 0, tp.file.title, "[W]ww") %> | 
<%*
| created | tags | aliases | week | year | ||
|---|---|---|---|---|---|---|
| <% tp.file.creation_date("YYYY-MM-DD HH:mm") %> | 
 | 
 | <% tp.date.now("YYYY-[W]ww", 0, tp.file.title, "[W]ww") %> | <% tp.date.now("YYYY", 0, tp.file.title, "[W]ww") %> | 
<%*
| function moviequote() { | |
| local response | |
| response=$(curl -s "https://quoteapi.pythonanywhere.com/random") | |
| local quote | |
| quote=$(echo "$response" | jq -r '.Quotes[].quote') | |
| echo "\"$quote\"" | |
| } | 
| ARN Base Pattern :- | |
| arn:<aws_parition>:<aws_service>:[<aws_region>]:<account_id>:<root | resource_type>:/<resource_name>[/<sub_resource_names>...] | |
| i. <aws_partition> | |
| Regex - (aws|aws-us-gov|aws-cn) | |
| ii. <aws_service> - No fixed pattern | |
| iii. <aws_region> - No fixed pattern | |
| Most of the regions occur in combination of 2 letter followed by "-" followed by a combination of direction based word , followed by a "-" and then a digit. | 
| #!/bin/bash | |
| # Check if the input file is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <input-xml-file>" | |
| exit 1 | |
| fi | |
| INPUT_FILE="$1" | |
| OUTPUT_FILE="${INPUT_FILE%.xml}.md" | 
| function add_ado_git_branch() { | |
| local project="<project name>" | |
| local title=$1 | |
| local description=$2 | |
| local org_url="https://dev.azure.com/<org name>" | |
| local api_version="6.0" | |
| local feature_id="<target feature id>" # (to link as parent to the created story) | |
| local assigned_to="<Your Name in Azure Devops>" | |
| local area="<org name>/<board name>" | 
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # Guide + Original: | |
| # http://www.systemsup.co.uk/automating-puppet-ssl-certificates-in-an-aws-autoscaling-environment/ | |
| # | |
| # I use a different method for autosigning certificates, using csr_attributes w/ password OID | |
| # I just needed a revocation method so I re-wrote this script to suit my needs. | |
| # This script is crontab'd on the puppet master | |
| # */5 * * * * /bin/python /scriptlocation/revoke.py us-east-1 SQSNAME >> /var/log/revoke.log | |
| # | |
| # Ermis Catevatis | 
| #!/bin/bash | |
| AWSENV="sandbox" | |
| SNSTOPIC="sandbox-autoscale" | |
| REGION="us-east-1" | |
| TOPICARN=$(aws-vault exec $AWSENV -- aws sns create-topic --name $SNSTOPIC --region $REGION | grep arn | cut -d'"' -f4) | |
| AUTOSCALEARRAY=($(aws-vault exec $AWSENV -- aws autoscaling describe-auto-scaling-groups --region $REGION | grep AWSEBAutoScalingGroup | sort | uniq -u | cut -d'"' -f4 | grep stack | grep -v arn)) | 
| #!/bin/bash | |
| # MKDIR /backup | |
| # git clone this script there | |
| # SETUP CRONTAB: | |
| # crontab -e | |
| # PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin | |
| # 0 0 * * * cd /backup && ./jenkins-backup-s3.sh | |
| set -ex | 
| #!/bin/bash | |
| DATE=$(date "+%Y-%m-%d") | |
| GITHUB_OWNER=petenelson | |
| BACKUPS_DIR=~/backups | |
| TAR_FILE=github-repos-$DATE.tar.gz | |
| S3_BUCKET=s3://github-offsite-backup | |
| # Creates a directory if it doesn't exist | |
| # $1: dir path |