Skip to content

Instantly share code, notes, and snippets.

View arl's full-sized avatar
🎧

Aurélien Rainone arl

🎧
View GitHub Profile
@chmike
chmike / sliceDump.go
Last active July 20, 2025 21:14
Go language function to dump a byte slice in hexadecimal and ASCII
func dumpByteSlice(b []byte) {
var a [16]byte
n := (len(b) + 15) &^ 15
for i := 0; i < n; i++ {
if i%16 == 0 {
fmt.Printf("%4d", i)
}
if i%8 == 0 {
fmt.Print(" ")
}
@egonelbre
egonelbre / architecture.md
Last active May 20, 2026 08:45
Gio architecture brain-dump
title Architecture

Introduction

Gio implements an Immediate Mode User Interface.. This approach can be implemented in multiple ways, however the overarching similarity is that the program:

  1. listens for events such as mouse or keyboard input,
@sinewalker
sinewalker / _gitmux_filter.sh
Last active September 1, 2022 07:36
gitmux filter to replace 'origin' with a symbol for the git host.
#!/usr/bin/env bash
# Wrapper for gitmux to change some strings in ways that it doesn't
# allow for. Also replace 'origin' with a symbol for the git host.
WORKING_COPY=${1}
[[ -d ${WORKING_COPY} ]] || exit 1
pushd $WORKING_COPY &> /dev/null
STATUS=$(git status) &> /dev/null || exit 2
URL=$(git config --get remote.origin.url) &> /dev/null
if [[ "${STATUS}" =~ "No commits yet" ]] ; then