# Directory script was called from
PWD="$(pwd)"
# Path part of the command line (caveats http://mywiki.wooledge.org/BashFAQ/028)
DIRNAME=$(dirname -- "$0")
# Calculate absolute directory name
if [[ $DIRNAME =~ ^/ ]] ; then
ABSDIRNAME="$(cd "${DIRNAME}"; pwd)"
Delete all buckets whose name starts with the string parameter. Works on versioning buckets and buckets containing objects.
# Delete all buckets whose name starts with the string parameter. Works on versioning buckets and buckets containing objects.
# Usage:
# deleteBucket "bucketname" Deletes buckets whose name starts with 'bucketname'
deleteBucket()
{
BUCKETS=`aws s3api list-buckets --output text --query "Buckets[?starts_with(Name, '$1')].Name"`
IFS=$'\t'
You will need an AppleID account.
I tried unsuccessfully to create one of these using the App Store app on the mac1.metal instance. If you need a new AppleID for your project, go to https://appleid.apple.com/account to create one.
This gist assumes that you have remote desktop set up to view your mac1.metal instance graphical user interface (GUI)
If this is not the case, use this gist including the prerequisite steps to be able to view the mac1.metal GUI.
The gist assumes that you have launched a mac1.metal instance, and are able to SSH into it. Your IP address must be the same as the one in the security group, especially watch out for VPNs.
If this is not the case, use this gist, including the linked steps to connect to the EC2 instance using SSH, to achieve this.
Visual Studio Code must be installed on the local device. Download and install the application.
Start the application.
The extension to Visual Studio Code for Remote – SSH must be installed.
Using an EC2 instance to do development allows numerous scenarios, like doing vanilla Linux/Unix development on a Windows host machine. Wouldn’t it be great to use amazing tools like Visual Studio Code to develop on an EC2 instance too, right from the device at your desk?
Visual Studio Code has a very nice feature to allow this, using the Remote-SSH extension. It can SSH into the EC2 instance, install the Visual Studio Code agent, and give you the shell prompt on the EC2 instance. Further, the development folder on the EC2 instance can be opened in Visual Studio, so that the whole application context appears to be on the EC2 instance.
Let’s set this up.
Go to the AWS EC2 dashboard in your AWS account. Select a region where EC2 instances are available, as at the time of writing, they are not available in all regions.You can see in this image that I have selected us-east-2 (by its display name, Ohio) top right of the window. Click the Launch Instance button.