Install VcXsrv
on Windows. Launch X Server with the settings: Display number: 0
, Disable access control: yes
# DISPLAY in WSL
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
#check
apt install x11-apps
How to check that CA certificate is untrasted under WSL2 (Ubuntu) and fix it
HOST=abc.foo.cloud # or another
openssl s_client -connect ${HOST}:443 -showcerts
Result:
CONNECTED(00000003)
cat | tee -a ~/.bashrc > /dev/null << "EOF"
# supported cases:
# git config user.email
# git clone https://aaa.git bbb && ls -al ~/.gitconfig
# git clone https://aaa.git aaa
# git checkout -b test
# git commit -am 'issue-42"s '
# git commit -am "issue-42's "
package aaa;
import com.google.common.util.concurrent.Uninterruptibles;
import io.vertx.core.Vertx;
import io.vertx.core.http.*;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.*;
function downloadFile(url) { | |
var loaded = $.Deferred(); | |
var request = new XMLHttpRequest(); | |
request.open('GET', url); | |
// ! setting the responseType has to be after the `request.open` | |
// `arraybuffer` is necessary for Internet Explorer and Edge becuase | |
// they do not support `blob` as response type | |
request.responseType = "arraybuffer"; | |
request.onload = function() { |
git config --global pull.rebase preserve |
for num in {1..3}; do | |
mkdir "$num" | |
cd "$num" | |
git clone "https://aaa.git" . | |
cd ".." | |
done |
https://www.rust-lang.org/tools/install | |
https://stackoverflow.com/questions/47379214/step-by-step-instruction-to-install-rust-and-cargo-for-mingw-with-msys2 | |
1) rustup-init.exe | |
2) customize installation -> Default host triple? x86_64-pc-windows-gnu | |
or | |
2) default installation and then `rustup toolchain install stable-x86_64-pc-windows-gnu && rustup default stable-x86_64-pc-windows-gnu` | |
https://github.com/rust-lang/rls (rust language server) | |
3) `rustup update && rustup component add rls rust-analysis rust-src` |
#add separate repo list and update | |
RUN sudo touch /etc/apt/sources.list.d/myrepo.list | |
RUN sudo /bin/bash -c 'echo "deb http://myrepo.corp/deb/ubuntu $(lsb_release -cs) main" >> /etc/apt/sources.list.d/myrepo.list' | |
RUN sudo /bin/bash -c 'echo "# deb-src myrepo.corp/deb/ubuntu $(lsb_release -cs) main" >> /etc/apt/sources.list.d/myrepo.list' | |
RUN sudo apt-get update -y -o Dir::Etc::sourcelist="sources.list.d/myrepo.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" || true | |
#add to global repos list | |
deb http://myrepo.corp/deb/ubuntu $(lsb_release -cs) main |