Skip to content

Instantly share code, notes, and snippets.

View sug0's full-sized avatar
💭
debugging

Tiago Carvalho sug0

💭
debugging
View GitHub Profile
@cenunix
cenunix / configuration.nix
Created June 2, 2023 07:55
X13s nixos configuration.nix
{ config, lib, pkgs, ... }:
let
linux_x13s_pkg = { buildLinux, ... } @ args:
buildLinux (args // rec {
version = "6.3.5";
modDirVersion = "6.3.5";
src = pkgs.fetchurl {
url = "https://github.com/steev/linux/archive/refs/heads/lenovo-x13s-linux-6.3.y.tar.gz";
@ANBAL534
ANBAL534 / gist:8057b5200ace9bdd98795b627e550ba0
Created May 26, 2022 20:57
Asseto Corsa on Linux Updated
If you want this guide to work on the deck, for easiness of following the guide, make your filesystem temporally writable
and install protontricks regularly.
This is really an update for the guide found here https://github.com/ValveSoftware/Proton/issues/148#issuecomment-585921635
We will be using Proton 5.0-10 the only proton version that works good for assetto.
Before starting, make sure you have no pfx folder for assetto corsa, you can search for it in:
/path/to/your/SteamLibrary/steamapps/compatdata/244210
@mszoek
mszoek / ravynOS_MachO_loading.md
Last active October 15, 2023 20:11
ravynOS: Executing MachO

Some notes on implementing MachO loading and dyld on ravynOS as an early PoC.

So far, I have modified rtld-elf (the FreeBSD runtime linker) to handle simple MachO objects. It can now successfully load and run a trivial MachO executable built on a Mac with an external library dependency (libSystem.B.dylib - the C library). The linker also still handles ELF objects, so I call this monstrosity the "Macho ELF".

Loading a MachO object into the dynamic linker

★ zoe@haru ~/airyx-freebsd/libexec/dyldᐳ llvm-objdump -d hello      
@snoyberg
snoyberg / abonimable-snoyman.rs
Created December 2, 2020 15:05
Playing with GATs, transformers, and more
#![feature(generic_associated_types)]
#[allow(dead_code)]
trait Functor {
type Unwrapped;
type Wrapped<B>: Functor;
fn map<F, B>(self, f: F) -> Self::Wrapped<B>
where
F: FnMut(Self::Unwrapped) -> B;
@comp500
comp500 / fabricserversidemods.md
Last active April 15, 2024 20:13
Useful Fabric server side mods
@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active June 6, 2024 17:16 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@dayvonjersen
dayvonjersen / slices.c
Created August 15, 2018 17:56
C++ For Go Programmers: Part 2 - Slices
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
struct slice {
size_t type;
int len;
int cap;
@spacejam
spacejam / rr-with-rust.md
Last active July 21, 2024 20:59
using rr with rust

using rust with rr

rr is a great debugging tool. it records a trace of a program's execution, as well as the results of any syscalls it executes, so that you can "rewind" while you debug, and get deterministic forward and reverse instrumented playback. it works with rust, but by default if you try it out, it could be pretty ugly when you inspect variables. if this bothers you, configure gdb to use a rust pretty-printer

rr is probably in your system's package manager.

usage