This file contains 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
sudo apt update | |
sudo apt install -y build-essential pkgconf libssh-dev libz-dev uuid-dev liblzma-dev libreadline-dev libffi-dev libbz2-dev | |
cd "$(mktemp -d)" | |
curl -LO https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz | |
tar xvf Python-3.11.9.tgz | |
cd Python-3.11.9/ | |
./configure --prefix ~/opt/python --enable-optimizations | |
make -j$(nproc) | |
make install | |
~/opt/python/bin/python3 -m pip install --upgrade --user pip |
This file contains 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
#!/usr/bin/env python3 | |
import argparse | |
import fnmatch | |
import os | |
import sys | |
def walktree(root, ignored_patterns): | |
try: |
This file contains 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
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#pragma comment(lib, "Shlwapi.lib") | |
/* Find the end of argv[0]. */ | |
static WCHAR * | |
findargs(WCHAR *s) | |
{ | |
if (s[0] == 34) |
This file contains 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
* text=auto eol=lf | |
*.{cmd,[cC][mM][dD]} text eol=crlf | |
*.{bat,[bB][aA][tT]} text eol=crlf |
This file contains 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
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
import os | |
filename = os.path.abspath(sys.argv[1]) | |
if filename.startswith('/mnt'): | |
# /mnt/c/a/b/c.txt -> c:\a\b\c.txt |