A Google Apps Script which adds pseudo message retention-like policies against specific labels for a Gmail account.
- Apps Script function is called automatically on a regular schedule.
- Script iterates over a set of predefined message labels.
A Google Apps Script which adds pseudo message retention-like policies against specific labels for a Gmail account.
Create a new systemd user unit, which starts ssh-agent
upon login to server. Will remain resident until the final session for the user has logged out.
Create /etc/systemd/user/ssh-agent.service
.
Run the following commands (under your user account, not root
) to install the systemd unit and start:
When using the shift
built-in, have noted this interesting behavior which I have been unable to find documentation for.
Update: the answer was right in front of me, if shift
is called with a value greater than arguments available in $1 - $x
then it will return with a non zero status - hence the script will halt (since I'm using set -e
)!
Using the script test.sh
, executed using arguments:
./test.sh apple orange banana
apple
Template that will create the following:
REGIONAL
endpoint.POST
requests only, with Lambda proxy integration to a target function.Script to return AMI IDs for a given AWS region associated to a marketplace product page. Requires AWS CLI and a valid set of credentials for the aws ec2 describe-images
call.
Bash script to iterate all commits of a given Git repository and extract all files within each commit.
With a Git repository at /path/to/repository
and an empty directory at /path/to/output
we can run:
./export.sh /path/to/repository /path/to/output
Documenting this here, as I often forget (what I have found) is the best way to do this at the moment.
For example, you have a list of two existing security groups given to a stack and wish to create (and use) a third - attaching all to an ALB:
AWSTemplateFormatVersion: '2010-09-09'
Description: Example template