Skip to content

Instantly share code, notes, and snippets.

@benesch
benesch / compile.sh
Last active November 11, 2023 03:33
Cross-compiling Materialize for ARM on x64 Ubuntu
sudo apt-get install -qy binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
export CMAKE_SYSTEM_NAME=Linux
export TARGET=aarch64-linux-gnu
export TARGET_AR=aarch64-linux-gnu-ar
export TARGET_CC=aarch64-linux-gnu-gcc
export TARGET_CXX=aarch64-linux-gnu-g++
export TARGET_RANLIB=aarch64-linux-gnu-ranlib
export TARGET_CPP=aarch64-linux-gnu-cpp
export TARGET_LD=aarch64-linux-gnu-ld
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=$TARGET_CC
@Sitin
Sitin / setup.sh
Last active March 7, 2024 17:10
Run x86-64 Docker images on Raspberry Pi 4 (QEMU/QUS)
# Setup QEMU for x86-64 Docker images on Raspberry Pi 4
# Install Python3 and Docker first: https://dev.to/rohansawant/installing-docker-and-docker-compose-on-the-raspberry-pi-in-5-simple-steps-3mgl
# Install QUEMU (https://www.qemu.org/)
sudo apt-get install qemu binfmt-support qemu-user-static
# Use QUS in Docker (https://github.com/dbhi/qus) to configure x86_64 architecture
docker run --rm --privileged aptman/qus -s -- -p x86_64
# Test x86-64 image:
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule