Skip to content

Instantly share code, notes, and snippets.

View tribals's full-sized avatar

Anthony tribals

  • Тамбов
View GitHub Profile
*.hex
*.s
*.elf
@tribals
tribals / .gitignore
Last active September 25, 2022 09:44
Elves
elf
object-replacement.char
new-elf
@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 / 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 / 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 
(use-modules (gnu packages base))
(use-modules (guix build-system copy))
(use-modules (guix download))
(use-modules (guix packages))
(use-modules (guix licenses))
(define-public u-boot-khadas-vim3l
(package
(name "u-boot-khadas-vim3l")
(version "2020.04")
@tribals
tribals / docker-compose.yml
Last active August 13, 2020 11:29
Usage of Pendulum's `DateTime` in SQLAlchemy columns of type `DateTime`
version: '3.7'
services:
postgres:
image: postgres:12.3
environment:
POSTGRES_HOST_AUTH_METHOD: 'trust'
ports:
- 5432:5432
@tribals
tribals / imports.py
Created March 7, 2019 11:50
Crude implementation of tool which helps to analyze Python imports: find unused, find used, etc...
import ast
import logging
import operator as op
import signal
import sys
import astor
logging.basicConfig(level=logging.INFO, stream=sys.stdout, format='%(message)s')
@tribals
tribals / Pipfile
Last active January 11, 2024 16:22
Understanding SQL row locking - `SELECT FOR UPDATE`
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
SQLAlchemy = "*"
"psycopg2-binary" = "*"
[dev-packages]
@tribals
tribals / Pipfile
Last active October 19, 2017 13:54
Flask app.config in different thread
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]