This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| // what substring in the URL indicates to us that we are editing the blog post | |
| let isPostPreview = 'post-preview' | |
| // the query selector to use for referencing the click trap element | |
| let querySelectorForClickTrap = '.blogger-clickTrap' | |
| // how long should the delay be before we attempt to remove the click trap element | |
| let wait = 3000 | |
| if (window.location.href.indexOf(isPostPreview) !== -1) { | |
| setTimeout(() => { | |
| console.log('nukeClickTrap') | |
| let it = document.querySelector(querySelectorForClickTrap) |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| # run the script on a set of URI-Ms: | |
| # python3 capture-requests.py < to-request.txt >> requests-log.txt | |
| # process the results and generate a new list of URI-Ms that were requested: | |
| # awk '{if ($1 ~ /cnn\.com(:80)?[\/]+$/ && $2 == "200") print $0}' requests-log.txt | sort -t '/' -k 5 >! requests.txt | |
| # https://pypi.org/project/selenium-wire/#installation | |
| import sys | |
| import time | |
| from seleniumwire import webdriver # Import from seleniumwire |
Install maven and java with coordinating versions that work with your system and Heritrix (see https://github.com/internetarchive/heritrix3/blob/master/.github/workflows/maven.yml):
sudo dnf install maven-openjdk17Building latest Heritrix (in this example, I put heritrix distributions at /usr/local/ and have a symlink named h3 that points to the one I currently use, i.e. /usr/local/h3 is a symlink pointing to /usr/local/heritrix-3.6.1-SNAPSHOT-20241205)
cd /tmp
git clone https://github.com/internetarchive/heritrix3.git
cd heritrix3