- Install Docker engine in both WSL1 and WSL2.
- In WSL1: Create, configure and use new context:
$ docker context create wsl2daemon $ docker context update --docker "host=tcp://[::]:2375" wsl2daemon $ docker context use wsl2daemon
- In WSL2: Configure the daemon in
/etc/docker/daemon.json
:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Put this into your .bashrc, or whatever. | |
function git-add-regex { | |
git diff -U0 | grepdiff -E "$1" --output-matching=hunk | git apply --cached --unidiff-zero | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function psleep { | |
S="$1" | |
O="$S" | |
while [ $S -gt 0 ]; do | |
echo -ne "\r$S s (from $O) " | |
sleep 1 | |
((S--)) | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// PHP highlights for https://github.com/fabiospampinato/vscode-highlight | |
"highlight.regexes": { | |
"(NOTE:)\\s": { | |
"regexFlags": "g", | |
"filterLanguageRegex": ".*", | |
"decorations": [ | |
{ | |
"color": "#CFC8A6", | |
"backgroundColor": "#CFC8A440", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import logging | |
import re as module_re | |
import re2 as module_re2 | |
USAGE_PROBABILITY = 0.5 | |
USE_ONLY_PYRE2 = True | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PREVIOUS="(@@.*function|class)" NEEDLE="getTraced" \ | |
bash -c 'git diff | awk "(/$PREVIOUS/ && !/$NEEDLE/) {capture=1; buffer = \$0; next} capture==1 {buffer = buffer \$0 \"\n\"} (\$capture && /$NEEDLE/) {printf(\"%s\", buffer); capture=0}"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import os | |
import subprocess | |
from sys import stderr | |
FORCED_GIT_GUI_PATH=None | |
# Do NOT modify anything below. | |
UNPATCHED_NEEDLE = 'pave_toplevel .' |
OlderNewer