Skip to content

Instantly share code, notes, and snippets.

View tribals's full-sized avatar

Anthony tribals

  • Тамбов
View GitHub Profile
@tribals
tribals / README.md
Created September 26, 2021 23:58
Example of C pointers overlap when casted to another (wider, in terms of bytes) type

Build it:

$ make overlap

Run it:

$ ./overlap 
@tribals
tribals / ld.musl-clang
Created November 11, 2021 13:09
musl compiler wrappers
#!/bin/sh
cc="clang"
libc_lib="/usr/lib64/musl"
ldso="/lib64/ld-musl-x86_64.so.1"
cleared=
shared=
userlinkdir=
userlink=
for x ; do
@tribals
tribals / Terminal 1
Last active January 18, 2022 01:52
guix shell --container and host guix daemon
### Pass only daemon-socket
bash-5.1$ guix shell -CNP --share=/var/guix/daemon-socket guix busybox
tosh@universe /tmp/tmp.EfI1Syh6ug [env]$ readlink -f ~/.guix-profile
/gnu/store/xp975nkjikb5gzdh45ig1kh9qddcrvlv-profile
tosh@universe /tmp/tmp.EfI1Syh6ug [env]$ guix package -I
tosh@universe /tmp/tmp.EfI1Syh6ug [env]$ guix package -i hello
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.
@tribals
tribals / .gitignore
Last active September 25, 2022 09:44
Elves
elf
object-replacement.char
new-elf
*.hex
*.s
*.elf
@tribals
tribals / README.md
Last active March 23, 2025 19:51
Zig & C library

Zig example to link with system library

Make sure you have libuuid installed on your system, precisely - it's "development" version. It is usually in util-linux package, so install util-linux-dev or the like.

I'm using Guix, if you do too - run this:

$ guix shell -m manifest.scm