## Create a new config/initialisation file
Create a user-level initialisation file init.el:
touch .emacs.d/init.el
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu_jammy_jellyfish.box" | |
| config.vm.provision "shell", inline: <<-SHELL | |
| apt-get update | |
| apt-get install -y apache2 vim git net-tools | |
| SHELL | |
| config.vm.provision "shell", inline: <<-JEKYLL | |
| apt-get update | |
| apt-get install -y apache2 vim git net-tools |
| Problem: | |
| I need to download a Virtualbox imaage using vagrant. | |
| The image is very large (around 5 GB) | |
| However, my internet connection is slow and flaky and I need to be able to resume in case of a break | |
| Solution: | |
| 1. Install a download manager like https://www.freedownloadmanager.org/ | |
| 2. Open "Vagrantfile" and locate the config.vm.box param - in my case, it's: | |
| config.vm.box = "aalkilani/spark-kafka-cassandra-applying-lambda-architecture" |
| import boto3 | |
| client = boto3.client('route53') | |
| def add_cname_record(source, target): | |
| try: | |
| response = client.change_resource_record_sets( | |
| HostedZoneId='<hosted zone id>', | |
| ChangeBatch= { | |
| 'Comment': 'add %s -> %s' % (source, target), |
| from area53 import route53 | |
| from boto.route53.exception import DNSServerError | |
| import requests | |
| import sys | |
| from datetime import datetime | |
| # Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/ | |
| domain = 'domain.tld' | |
| subdomain = 'subdomain_name' |