This guide explains how to create, mount, and maintain a VHDX drive for use with WSL (Windows Subsystem for Linux).
- Windows 10/11 with WSL2 installed
- Administrative access
- PowerShell
- Sufficient disk space
| <# | |
| #Required: | |
| Install-Module -Name LoopbackAdapter -MinimumVersion 1.2.0.0 | |
| #run in admin terminal | |
| #you do NOT need to disable/remove SMB 1.0/CIFS | |
| #Troubleshooting: | |
| #You can check [attempted] forwardings and [successful] listeners here, respectively | |
| netsh interface portproxy show v4tov4 |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
Suppose you need to add a section to an ELF binary to contain information gathered at compile time, but to be used at link time or run time. Here's how to add a section named .okdata and either populate it with data either after or before emitting the ELF binary.
In this case, you'll add file’s contents to an already existing binary. objcopy copies and translates object files, such that adding a new section is a matter of writing that new section’s contents into the ELF file.
(Optional) Create a simple program’s object file.
This is a document describing how to install Ubuntu 16.04 LTS on ThinkPad T470s.
| function asyncFunc(e) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(e), e * 1000); | |
| }); | |
| } | |
| const arr = [1, 2, 3]; | |
| let final = []; | |
| function workMyCollection(arr) { |
| /* | |
| * Minimalistic implementation of the XModem/YModem protocol suite, including | |
| * a compact version of an CRC16 algorithm. The code is just enough to upload | |
| * an image to an MCU that bootstraps itself over an UART. | |
| * | |
| * Copyright (c) 2014 Daniel Mack <[email protected]> | |
| * | |
| * License: MIT | |
| */ |