Skip to content

Instantly share code, notes, and snippets.

View mdouchement's full-sized avatar
♨️
❨╯°□°❩╯︵┸━┸

mdouchement mdouchement

♨️
❨╯°□°❩╯︵┸━┸
View GitHub Profile
@mdouchement
mdouchement / amdvlk_flatpak.md
Last active April 22, 2025 21:13
Setup AMDVLK with Flatpak

For a few days I tried to create a org.freedesktop.Platform.GL.amdvlk package but I didn't get it work due to my lack of Flatpak Runtime knowledge and the few documentation about GL extensions.
I was starting to give up using AMDVLK in Flatpak when I think about, can I inject AMDVLK in the default Mesa driver org.freedesktop.Platform.GL.default? I tried and it works.
Here is the "hack" I did to make it work.

Setup

Download the latest Debian/Ubuntu release from https://github.com/GPUOpen-Drivers/AMDVLK/releases/latest Currently it's amdvlk_2025.Q1.3_amd64.deb, open it with an archive manager and open the data.tar.gz archive.

Open the folder ~/.local/share/flatpak/runtime/org.freedesktop.Platform.GL.default/ (this is the default "user" location, it is an another place for "system" Runtime).\

@mdouchement
mdouchement / settings.json
Last active April 18, 2025 12:28
Zed 0.164.2 - 0.182.11 Editor configuration for Golang
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
// Other guide: https://www.kevnu.com/en/posts/10
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
@mdouchement
mdouchement / boot-docker.sh
Last active February 9, 2025 00:53
Restore Docker on TrueNAS SCALE 23 & 24 and above (no Kubernetes)
#!/usr/bin/env bash
# Using Docker on TrueNAS SCALE 23+ & 24+ (no Kubernetes)
#
# Don't setup Apps via the TrueNAS Web GUI (don't choose a pool for Apps when asked).
# Make a dedicated docker dataset on one of your data pools.
#
# Store this script somewhere else on your pool (not in the Docker dataset).
# Download binaries archive from https://download.docker.com/linux/static/stable/x86_64/ and unarchive them in a `docker' folder in the same directory.
# Like https://download.docker.com/linux/static/stable/x86_64/docker-27.1.1.tgz
@mdouchement
mdouchement / steam-link.md
Last active July 27, 2024 20:19
Steam Link SSH & how to disable Bluetooth
@mdouchement
mdouchement / lehmer.go
Last active September 11, 2020 17:48
Lehmer random bytes slice generator
package main
import (
"fmt"
"time"
)
func main() {
seed := uint64(time.Now().UnixNano())
p := make([]byte, 128)
@mdouchement
mdouchement / Dockerfile
Created October 6, 2019 14:22
Custom Dockerfile for github.com/root-gg/plik
# build stage
FROM golang:1.13-alpine as build-env
MAINTAINER mdouchement
# Set the locale
ENV LANG c.UTF-8
# Install build dependencies
RUN apk upgrade
RUN apk add --update --no-cache \
@mdouchement
mdouchement / gvm_disable_gopath_handling.go
Last active September 25, 2018 13:15
Disable GVM GOPATH handling
// This Go script will disable annoying GVM GOPATH management.
// Based on https://github.com/e-nikolov/gvm repository
//
// MIT License
package main
import (
"bytes"
"fmt"
@mdouchement
mdouchement / camelcase.go
Created November 16, 2017 16:58
Golang camelcase / camelize
package main
import (
"fmt"
"unicode"
)
func main() {
for _, v := range []string{"target_prob1", "target_prob_1", "_target_prob_1", "target_prob_1_"} {
fmt.Printf("%s => %s\n", v, ToCamel(v))
@mdouchement
mdouchement / .gitrc.sh
Last active December 19, 2018 11:18
Git aliases from ZSH (without zsh)
alias gco='git checkout'
alias gb='git branch'
alias gd='git diff'
alias glgg='git log --graph --max-count=10'
alias glgga='git log --graph --decorate --all'
alias gst='git status'
alias gss='git status --short'
alias ga='git add'
alias gc='git commit'
alias ggpull='git pull origin $(git rev-parse --abbrev-ref HEAD)'
@mdouchement
mdouchement / gzip_bug.go
Last active June 19, 2017 15:24
Golang gzip reader does not returns the right error.
package main
import (
"bytes"
"compress/gzip"
"errors"
"fmt"
"io"
)