Skip to content

Instantly share code, notes, and snippets.

View xiaoxi-ij478's full-sized avatar

xiaoxi-ij478

View GitHub Profile
#!/usr/bin/env python3
import getopt
import os
import pathlib
import sys
import zlib
from abc import ABCMeta, abstractmethod
from typing import ByteString
@xiaoxi-ij478
xiaoxi-ij478 / update_nvidia.sh
Created October 26, 2023 14:58
Update NVIDIA driver on any linux box
#!/bin/bash
LC_ALL=C.UTF-8 LANG=C.UTF-8 checkonly=false
check_terminal()
{
tty -s || exec xterm "$0"
}
check_root()
{
@xiaoxi-ij478
xiaoxi-ij478 / build_llvm.sh
Created October 21, 2023 15:13
Build LLVM for Android
#!/bin/bash
set -e
# Build Programs with Android NDK & ccache
function android_build() {
TOOLCHAIN="$NDK"/toolchains/llvm/prebuilt/linux-x86_64
TARGET=$1
API=$2
shift 2
AR="$TOOLCHAIN/bin/llvm-ar" \