Skip to content

Instantly share code, notes, and snippets.

View Cadichon's full-sized avatar

Cadichon

  • Elephant Technologies
  • Nantes, France
View GitHub Profile
@Cadichon
Cadichon / running_in_docker.sh
Created November 12, 2020 14:49
check if running inside docker container
running_in_docker() {
#shellcheck disable=SC2034
(awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r non_empty_input) > /dev/null 2>&1
}
@Cadichon
Cadichon / gist:1122d2398a1d6a4b410bd5e91d3b060d
Created February 11, 2020 01:21
netkas.org: Bringing back 32-bit apps to life
I have found out that 32-bit apps support in Catalina was disabled but not completely removed
Current state is enough to run some console 32-bit apps in catalina
to have it run this command:
sudo nvram boot-args=”no32exec=0″
if one wants more, like gui app, need to use some libs from mojave probably.
@Cadichon
Cadichon / gist:6f1dca29a45ea8d1e45bbf3529ef57f2
Last active February 10, 2020 22:24
Generate Intel syntax assembly in macOS
clang -S -mllvm --x86-asm-syntax=intel test.cpp

Download coreutils version 8.21 (TODO: port it for 8.31) and patch it.

cd /tmp
wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
tar -xvJf coreutils-8.21.tar.xz
cd coreutils-8.21
wget https://raw.githubusercontent.com/atdt/advcpmv/master/advcpmv-0.5-8.21.patch
patch -p1 -i advcpmv-0.5-8.21.patch

Run: