Skip to content

Instantly share code, notes, and snippets.

View Qubasa's full-sized avatar
🐞

Luis Hebendanz Qubasa

🐞
View GitHub Profile
@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@Mic92
Mic92 / example.rs
Last active February 27, 2021 10:41
Attach gdb on demand in rust
mod gdb_break;
pub fn main() {
// this will create a new tmux session with gdb
// To let the program continue run `detach` in gdb and close it
gdb_break();
}
#define STR(x) #x
#define TO_S(x) STR(x)
__asm__("int3; nop " TO_S(__LINE__) ::: "memory");
@Qubasa
Qubasa / rust_secrets.md
Last active September 25, 2022 22:40
Helpful rust commands and knowledge

Target json

Prints out the current target json

$ rustc --print target-list 
$ rustc +nightly -Z unstable-options --print target-spec-json --target x86_64-unknown-linux-gnu

To add a target json to your project create a file in at .cargo/config:

[build]
target = "x86_64-unknown-linux-gnu-asd.json"
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active November 22, 2025 18:54
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@aojea
aojea / linked-clone.sh
Last active October 29, 2024 03:11
Script to create a linked clone with libvirt
#!/bin/bash
set -xe
# This script takes as a parameter the name of the VM
# and creates a linked clone
# Ref: https://unix.stackexchange.com/a/33584
# The scripts assumes that it runs from the same folder
# where the vm image is located and it coincides with the
# image name