Skip to content

Instantly share code, notes, and snippets.

View agirault's full-sized avatar
👨‍💻

Alexis Girault agirault

👨‍💻
View GitHub Profile
@agirault
agirault / list_docker_cache_mounts.sh
Last active October 8, 2025 02:19
List docker cache mount names, location, and true file system size
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025 Alexis Girault. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@agirault
agirault / cuda_sm_compatibility_matrix.md
Last active October 7, 2025 15:46
CUDA GPU Compute Capability - Compatibility
@agirault
agirault / ooni_pizza_dough.md
Last active April 21, 2025 23:55
🍕 Ooni dough recipe

Classic Slow-Ferment Ooni Pizza Dough

Ingredients

Ingredient Quantity
Flour (00 or bread/all-purpose) 875g (about 7 cups)
Water 525g (2 1/4 cups) for 00 flour (60% hydration) / 569g (2 1/3 cups) for bread/AP flour (65% hydration)
Salt 17.5g (3 tsp or 1 tbsp + 1 tsp)
Active Dry Yeast 3.5g (about 1 tsp)
#!/bin/bash
set -eu
function current_kernel_version() {
uname -r | sed -r 's/-[a-z]+//'
}
function kernels() {
dpkg -l linux-{image,headers,modules,hwe,modules-extra}-"[0-9]*" | awk '/ii/{print $2}'
}
#!/bin/bash
set -exo pipefail
# Check for sudo
if [[ $EUID -eq 0 ]]; then
echo "This script must not be run as root"
exit 1
fi
# vars
import vtkImageMapper from 'vtk.js/Sources/Rendering/Core/ImageMapper';
import * as vtkMath from 'vtk.js/Sources/Common/Core/Math';
const { SlicingMode } = vtkImageMapper;
const ScreenSide = {
top: Symbol('top'),
bottom: Symbol('bottom'),
left: Symbol('left'),
right: Symbol('right'),
@agirault
agirault / orientationLabel.swift
Last active February 1, 2021 21:40
Generate the anatomical labels for each side of the screen given a dataset (orientation) and its display mode (data vs world mapping)
import simd
enum Axis {
enum Data {
case I
case J
case K
}
enum World {
@agirault
agirault / image_orientation_dicom.md
Created October 8, 2020 22:31
Image Orientation in Dicom
@agirault
agirault / build_gdcm_ios.sh
Last active January 2, 2023 16:57
Build GDCM for iOS - fat library arm64 x86_64
#!/bin/bash
# Parameters
os_target_version=11
gdcm_tag=v2.8.9
install_dir=/usr/local/Frameworks/gdcm
# Directories
script_dir=$(cd $(dirname $0) || exit 1; pwd)
src_dir=${script_dir}/gdcm-src
@agirault
agirault / CMakeLists.txt
Last active March 6, 2025 17:01
CMake configuration for a shared ios framework linking against static Qt5 libs to be embedded in an iOS app
# cmake /path/to/src \
# -GXcode \ # or Ninja
# -DQt5_DIR=/path/to/Qt/5.13.0/ios/lib/cmake/Qt5 \
# -DCMAKE_SYSTEM_NAME=iOS \
# -DCMAKE_OSX_DEPLOYMENT_TARGET=11 \
# -DCMAKE_INSTALL_PREFIX=/usr/local/frameworks \
# -DCMAKE_OSX_ARCHITECTURES="arm64" \ # arm64 for device, x86_64 for simulator (but x86_64 not in installed Qt5 ios static libs?)
cmake_minimum_required (VERSION 3.14 FATAL_ERROR)
project (Foo VERSION 1.0 LANGUAGES C CXX)