Skip to content

Instantly share code, notes, and snippets.

@Arnavion
Arnavion / 01_build.sh
Created February 3, 2023 05:08
steam in podman container
# ~/src/non-oss-container/build.sh
#!/bin/bash
set -euo pipefail
mkdir -p ~/non-oss-root/
podman image rm --force localhost/non-oss || :
@Arnavion
Arnavion / mrhlpr
Created March 23, 2024 17:46
mrhlpr wrapper that works directly on the user branch
#!/bin/bash
set -euo pipefail
shopt -s inherit_errexit
mkdir -p ~/.cache/mrhlpr
case "${1:-}" in
'fixmsg')
if [ -n "$(git status --porcelain)" ]; then
//! <https://rust.godbolt.org/z/z78Gh8j47>
/// # Safety
///
/// `ptr` must point to an allocation that contains at least `size_of::<u64>()` bytes
/// at `ptr`'s address.
#[inline(never)]
pub unsafe fn core_read_unaligned(ptr: *const u8) -> u64 {
// With `target-feature+unaligned-scalar-mem` this does a single `ld` as desired.
// Without that feature it falls back to loading each byte one-by-one and shifting them into place,