Opening words

Dear Visitor,

I’m Alex Radzishevsky, welcome to my digital abode. I occasionally update this space whenever time allows.

I’ve been into the computing world for 35 years, I’ve seen and been a small part of its evolution. I held membership in Fidonet (2:461/113) and operated my own dial-up BBS back in the 90s. I’m still a fan of tracker music and the demoscene. And yes, I still use the old Norton-style file commander on my modern Windows computer.

You won’t find me on big social platforms such as Facebook et al. I like the more old-school ways of talking: email, chat, phone call, or meeting face-to-face. For me, these feel more real and hold more substance than the ephemeral interactions of modern-day ‘social’ networks. Plus, I have more fun things to do with my time.

If you want to get in touch, just send me an email. If you’re curious about my life, take a look around this site. I’ve shared what I’m okay with everyone knowing. And if you’re here for work reasons, my LinkedIn is the place to go. If you just want to see some pictures, check out my photo album. I add new ones when I can.

You’ll find my latest posts below.

Warm regards,
Alex Radzishevsky.


Avoid charges for AWS Elastic IP’s — How to automatically update the IP address of a DNS record of a domain defined in Amazon Route53 from an EC2 instance

Your EC2 instance is assigned a fixed public IP from a list of Elastic IPs. But Amazon charges a considerable amount of money for the Elastic IP. Is there a way to automatically update the IP address of a DNS record defined in Amazon Route53 from the EC2 instance? Yes, there is, and it’s not hard. You can write a “bootstrap” script that is executed when the instance is started. The script will update the public DNS record according to the public IP of the instance.

1. Allow EC2 changing Route53 records

Detailed instructions for creating an IAM role

Log into your AWS management console.

Proceed to AIM (“Identity and Access Management”). Click on Roles. Click on Create role.

Select AWS service as the trusted entity type.

Select EC2 for the Use Case, then select EC2 (“Allows EC2 instances to call AWS services on your behalf”)

In the Permission policies, select AmazonRoute53FullAccess.

Click on Next: Tags (optional step, you can add tags to organize and manage your role).

Click on Next: Review.

Name your role. Choose a name that makes sense for its purpose, like EC2Route53UpdateRole.

(Optional) Add a description that explains the role’s purpose, like “Allows EC2 instances to update Route 53 DNS records.”

Review your choices and click on Create role.

Finalize and use the Role

After creating the role, you need to attach it to your EC2 instance:

  • Go back to the EC2 dashboard.
  • Select your instance.
  • Choose Actions, navigate to Security, and select Modify IAM role.
  • Choose the IAM role you created (EC2Route53UpdateRole) from the drop-down menu and save your changes.

By assigning this role to your EC2 instance, you have given it permission to make changes to the DNS records of Route53. This is important so that the bootstrap script works as intended and your instance automatically updates the associated DNS entry on restart. 

2. Create a bootstrap script

Place the following script in your EC2 instance:

#!/bin/bash

# =====================================================================================
# This script performs update of Route53 DNS record with current IP of an EC2 instance.
# Alex Radzishevsky, http://radzishevsky.info
# 2024-03-03
# =====================================================================================
# 
# - Read and understand this script
# - Edit it according to your needs
# - Make it a bootstrap script: * in Amazon Linux, place it inside 
#                                 /var/lib/cloud/scripts/per-boot 
#                               * in Ubuntu, create a systemd service file


# Get current public IP of the instance
IP=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)

# A function to update a single "A" record within DNS, 
# A domain name and the an ID of the hosting EC2 instance are conveyed via function 
# arguments (see below).
# 1st argument: ID of the EC2 instance hosting the domain. Use this command in the 
#               EC2 instanc to list all zones using (requires AWS CLI): 
#                     aws route53 list-hosted-zones
#               Find the right record in the list related to the domain you need.
# 2nd argument: Your domain for which you'd like to change the IP
update_single_record() {

    HOSTED_ZONE_ID=$1                           
    RECORD_SET_NAME="$2." # domain name must end with a dot
    TTL=60
	
    # Form JSON structure to update DNS record
    JSON_STR="{\"Changes\":[{\"Action\":\"UPSERT\",\"ResourceRecordSet\":{\"Name\":\"$RECORD_SET_NAME\",\"Type\":\"A\",\"TTL\":$TTL,\"ResourceRecords\":[{\"Value\":\"$IP\"}]}}]}"
	
    # Update the Route53 record
    aws route53 change-resource-record-sets --hosted-zone-id $HOSTED_ZONE_ID --change-batch "$JSON_STR"
	
}


# updating multiple domain records one after another
update_single_record "Z29472984792374983FF" "mydomain.com" 
update_single_record "Z29472984792374983FF" "another.mydomain.com" 

Save it as route53-update.sh.

Now you have to make sure that the script is executed every time the instance is (re)started.

Make the script executable with chmod.

For Amazon Linux, just place the script in: /var/lib/cloud/scripts/per-boot

For Ubuntu Linux, create a service file and use systemd.

Make MacOS running faster in VMWare

Here is how you can accelerate MacOS running in VMWare virtual machine in Windows 10/11.

The key performance factor: MacOS VM must run with “Virtualize Intel VT-x/EPT or AMD-V/RVI” enabled, otherwise it will run slowly.

You may not be able to enable this checkbox if your processor does not support virtualization. You need to consult with your CPU documentation to figure that out. For example, for Intel i7-10700K, we can see that the virtualization is supported:

If your CPU supports virtualization, you still may experience the following error message when enabling the needed feature in VMWare:

If it happens, do the following:

Reboot, go to BIOS and make sure that:

  • Intel Virtualization is enabled
  • Intel VT-d is enabled

Boot into Windows.

Under Start, search for “Core isolation”, and turn it off:

Under Start, search for “Turn Windows features on and off”, and then:

  • disable “Hyper-V”
  • disable “Virtual Machine Platform”

Reboot.

Go to ‘cmd’, and run the following command: systeminfo

At the very end of the report, if you see this:

then you are good to go.

However, if you see this:

then run ‘cmd’ as administrator, and run the following command:

bcdedit /set hypervisorlaunchtype off

Reboot.

Once done, make sure that the virtualization under ‘systeminfo‘ is reported as:

TrustedAudio.com — secure, watermarked audio delivery platform

We’ve just launched TrustedAudio.com – secure, watermarked audio delivery platform.

TrustedAudio is a web-based service addressing anti-piracy needs of individual musicians, composers, labels, studios and various music and audio professionals (and especially those, who are less into “computer science” and more into their profession).

A short description: “TrustedAudio (TA) is a professional web-based tool that provides an easy and reliable way to share, deliver, and distribute audio files securely by means of watermarking and digital signing. Simply log in, upload your audio files, fill in the recipients’ info, and send the files! All recipients receive their own uniquely and inaudibly watermarked (“digitally signed”) copy of each distributed audio file. Unique watermarks are embedded into every audio file copy delivered to each individual recipient. Records of each watermark, together with the file and the recipient info associated with it, are securely stored in the TA database, enabling the file owner to identify and back-trace delivered copies at any time, instantly and reliably”.

More information: TrustedAudio.com

wavedraw – a simple tool that generates BMP waveform picture of a sound file

Ever needed to generate a waveform picture of an audio file? I was in need of such tool myself and, to my big surprise, didn’t find any! So I wrote it myself. The tool loads a standard RIFF wave sound file (.wav), generates waveform picture and stores it in BMP format. You can specify any desired picture size and background/foreground colors. Only one (left) audio channel of the input file is analyzed.

the tool is free. Use it on your own risk.

I place Windows, Linux and Mac binaries in one archive: wavedraw_all_os.zip