dig o-o.myaddr.l.google.com txt @ns1.google.com +short
# OR
nslookup -type=txt o-o.myaddr.l.google.com ns1.google.com
#!/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...] |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = false | |
max_line_length = 100 | |
tab_width = 2 | |
ij_continuation_indent_size = 4 | |
ij_formatter_off_tag = @formatter:off |
Below are the steps to get an ARM64 version of Ubuntu running in the QEMU emulator on Windows 10.
Install for Windows from https://qemu.weilnetz.de/w64/ (I used qemu-w64-setup-20181211.exe
)
Put C:\Program Files\qemu
on your PATH, and run the below to check it's working (which will list out
the CPUs the AArch64 emulator can emulate):
qemu-system-aarch64 -M virt -cpu help
Inheritance and Virtual Table are often used to create interface in C++ polymorphic class
What if ... there were another way to do this ?
easier, cleaner, faster and more reliable
This article explains how to useCRTP
, [std::variant
](https://en.cppreference.com/w/cpp/utility/variant andstd::visit
to increase code performance.
Accessing a subnet that is behind a WireGuard client using a site-to-site setup
We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.
- Copy content of
vsix-bookmarklet
, create a bookmark in your browser. - Navigate to the web page of the VS Code extension you want to install.
- Click the bookmark you just created, then click the download button.
- After download finished, rename the file extension to
*.vsix
. - In VS Code, select Install from VSIX... in the extension context menu.
- Open Chrome Developer tools and click the Network tab.
- Navigate to the page with the video and get it to start playing.
- Filter the list of files to "m3u8".
- Find master.m3u8 or index.m3u8 and click on it.
- Save the file to disk and look inside it.
- If the file contains a single m3u8 master url, copy that one instead.
- Run the program m3u8x.
- Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
// -------------------------------------------------------------------------------------- | |
// Atomic singly-linked intrusive list using 128-bits Compare And Swap (AKA: DCAS). | |
// Keeps a version counter with the list head to prevent the A-B-A problem. | |
// | |
// Based on the implementation found in moodycamel.com: | |
// http://moodycamel.com/blog/2014/solving-the-aba-problem-for-lock-free-free-lists | |
// | |
// My implementation uses raw GCC/Clang atomics intrinsics. While in theory | |
// std::atomic of a struct of exactly 16 bytes and properly aligned could |