author profile image

Matt Reid

Lead Software Architect. Java, Node.js and TypeScript enthusiast.

I recently had to copy an S3 bucket from one account to another. Here”s the steps required. In the AWS account you want to copy from, allow the account you want to copy to access. { "Version": "2008-10-17", "Statement": [ { "Effect": "Allow", "Sid": "AccountBAccess1", "Principal": { "AWS": "XXXXXXXX" },...

Here’s a little bash script I’ve been using to backup ec2 instances #!/bin/bash #Before running this script, add the following to your ~/.bashrc #export AWS_ACCESS_KEY=your_access_key #export AWS_SECRET_KEY=your_secret_key #export AWS_REGION=eu-west-1 # initialize the EC2 environment [ -e /etc/profile.d/aws-apitools-common.sh ] && source /etc/profile.d/aws-apitools-common.sh # load the access keys source ~/.bashrc # locate...

Using a standard relation database it is easy to update the value of a column with that of another using a simple update statement. This is not the case with mongodb, luckily you can perform a simple query to produce the same result. By looping through every matching element in...

If you have a node application with manually installed dependencies (using npm-install), you may want to generate a package.json file. Luckily there is a simple command for this, simply run npm init and follow the prompts.  

When working on a project using git for version control, it may be useful to be able to push changes to multiple remotes (for example heroku and github at once). Luckily it”s very simple. Edit .git/conf and add [remote "all"] url=ssh:[email protected]/* *//repos/g0.git url=ssh:[email protected]/* *//repos/g1.git replacing g0 and g1 with the...