Tips & Tricks - Oliver-Mustoe/Oliver-Mustoe-Tech-Journal GitHub Wiki
The following, when entered into a browsers console, will result in all of the links on the page being presented in a table format:
var x = document.querySelectorAll("a");
var myarray = []
for (var i=0; i<x.length; i++){
var nametext = x[i].textContent;
var cleantext = nametext.replace(/\s+/g, ' ').trim();
var cleanlink = x[i].href;
myarray.push([cleantext,cleanlink]);
};
function make_table() {
var table = '<table><thead><th>Name</th><th>Links</th></thead><tbody>';
for (var i=0; i<myarray.length; i++) {
table += '<tr><td>'+ myarray[i][0] + '</td><td>'+myarray[i][1]+'</td></tr>';
};
var w = window.open("");
w.document.write(table);
}
make_table()
Example (First image is setup last is results):
- When installing use BIOS (if it is not, reinstall with the other option and update this)
- Make sure that the Network adapter connected to WAN is "Bridged" -- and "Bridged" should be set to the right adapter if using VMware Workstation (it often uses the wrong one, so check)
- Timezones :)
- If using as a DNS, make sure these options are set in Services/DNS Resolver
- Not 100% sure, but make sure that the following setting is ticked when setting up a static host in DHCP
https://euangoddard.github.io/clipboard2markdown/ -- Good website for copying notes over https://www.tablesgenerator.com/markdown_tables -- Good website for making markdown tables
Indicates comments (<!---
is start and --->
is end):
<!---
--->
Instead of wget
in Powershell, use the following will increase the speed BY A LOT:
(New-Object Net.WebClient).DownloadFile("{LINK TO DOWNLOAD}", "{OUTFILE}")
Like for example, the following will download and install Wireguard:
(New-Object Net.WebClient).DownloadFile("https://download.wireguard.com/windows-client/wireguard-installer.exe", "$env:temp\wireguard-installer.exe") | Start-Process "$env:temp\wireguard-installer.exe"
Install open-vm-tools with the following (rhel is used below, for deb change dnf
with apt
)
sudo dnf install open-vm-tools -y
sudo dnf install open-vm-tools-desktop -y
# And if using i3 add the following to "~/.config/i3/config" and restart the vm if copy paste isnt working:
exec --no-startup-id vmware-user-suid-wrapper
A computer fix that I used to fix a Windows laptop that was malfunctioning
https://www.easeus.com/computer-instruction/windows-stop-code-0xc000021a.html