```mermaid
sequenceDiagram
participant dotcom
participant iframe
participant viewscreen
dotcom->>iframe: loads html w/ iframe url
iframe->>viewscreen: request template
viewscreen->>iframe: html & javascript
iframe->>dotcom: iframe ready
| import base64 | |
| import mimetypes | |
| import os | |
| from bs4 import BeautifulSoup | |
| with open('example.html', 'rb') as file_handle: # Read in as a binary file | |
| soup = BeautifulSoup(file_handle) |
| # should works on any cloud-init enabled hypervisor (openstack.. ) | |
| # start from a normal ubuntu 20.04 install as minimal was not available for ARM64 | |
| # Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB | |
| # Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root' | |
| sudo -i | |
| # make sure we are on the highest kernel, so we can delete all the others ... |
This is a WIP patch that declares QEMU thread(s) as high-performance to the macOS QoS scheduler.
Apply this patch using git am 0001-util-qemu-thread-posix.c-Declare-QEMU-thread-s-as-hi.patch.
This is most useful on Apple Silicon (arm64) machines, as this pins QEMU to the faster performance cores instead of the slower efficiency cores on those systems (which use a heterogeneous core architecture).
This may possibly also result in better performance on x86_64 macOS machines, as well.
TODO: Determine if there is a better place to put this function call, as this would effectively declare every QEMU thread as high-performance, which may not be desired behaviour if QEMU spawns threads for purposes other than guest OS emulation (which I am not certain about).
Here's a list of things I find useful to check off when writing handover documentation for source code.
These get checked at the end, but they're at the front of the document because they're good to keep in mind the whole time
- Do these instructions work cross-platform? If not, which platform do they work on?
- If the source of truth is not this document, should some of the questions be answered with links (to eg confluence/other repos)
Read https://docusaurus.io/docs/next/using-themes#swizzling-theme-components
Run npm run swizzle @docusaurus/theme-classic Foote
Linking a custom domain to a deployed application is confusing and at times you don't get a route on how to link the domain with the website. 😫
In this article, I will be explaining how to link a Custom domain brought in Google Domains service to an application hosted on Vercel.
Perks of using vercel is that it allows adding domain without any verification unlike Heroku/Netlify, which means you don't have to add your billing details to add a domain to your application. Moreover, it is fast, efficient, and easy to use.😁
Vercel is a deployment and collaboration platform for frontend developers. Vercel enables developers to host websites and web services that deploy instantly and scale automatically – all without any configuration. Source - Official Docs
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. You also need to put"type": "module"in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)from CommonJS instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64
- Install Xcode from App Store or install Command Line Tools on your Mac running on Apple Silicon.
Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.
- find a way how to run the same node version on both platforms
