Skip to content

Instantly share code, notes, and snippets.

View mcanouil's full-sized avatar

Mickaël Canouil mcanouil

View GitHub Profile
#import "@preview/gribouille:0.3.0": *
#set page("a4", margin: 2.5cm)
// === Data management: reproduce `creations` ===
#let challenges = csv("bakeoff-challenges.csv", row-type: dictionary)
// grepl patterns -> ingredient names (French labels match the R script).
#let ingredients = (
@mcanouil
mcanouil / 2026-05-25-linkedin.typ
Created May 25, 2026 22:04
Carousel: 2026-05-25 — Quarto Offset Headings v0.1.0
// Carousel: 2026-05-25 — Quarto Offset Headings v0.1.0
#set document(title: "Quarto Offset Headings v0.1.0", author: "Mickaël Canouil")
#set text(lang: "en")
#set page(width: 21cm, height: 18cm, margin: 0cm)
// ── palette ──────────────────────────────────────────────────────────────
#let bone = rgb("#f3f1ea")
#let bone-2 = rgb("#e8e5db")
#let ink = rgb("#19222b")
#set page(width: auto, height: auto, margin: 0.5cm)
#let species_card(name, colour, note) = block(
width: auto,
inset: 0pt,
radius: 4pt,
fill: luma(99%),
stroke: (paint: colour, thickness: 0.6pt),
)[
#set block(spacing: 0pt)
@mcanouil
mcanouil / pkgdown.yml
Created March 18, 2026 19:35
Workflow to deploy pkgdown website from action
name: pkgdown.yaml
on:
workflow_dispatch:
push:
branches:
- main
release:
types: [published]
@mcanouil
mcanouil / warnings.qmd
Created September 25, 2025 08:35
Quarto R Warnings & Messages Handling
---
engine: knitr
knitr:
opts_chunk:
message: NA
warning: NA
---
```{r}
#| label: setup
@mcanouil
mcanouil / gh-ghost-notification.sh
Created September 24, 2025 14:05
Get rid of GitHub ghost notification
#!/usr/bin/env bash
# https://github.com/orgs/community/discussions/6874
DAYS_AGO=${1:-7}
# Cross-platform: prefer BSD -v, fall back to GNU -d
if date -v -"${DAYS_AGO}"d +%Y >/dev/null 2>&1; then
DATE=$(date -v -"${DAYS_AGO}"d +%Y-%m-%d)
else
@mcanouil
mcanouil / search-quarto-extensions.sh
Last active March 21, 2025 15:55
Search text in files from GitHub repositories
#!/usr/bin/env bash
CSV_FILE="https://raw.githubusercontent.com/mcanouil/quarto-extensions/refs/heads/main/extensions/quarto-extensions.csv"
KEYWORD="\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}"
includes_keyword() {
local repo=$1
local branch=$2
local keyword=$3
if [[ "${repo}" == */*/* ]]; then
@mcanouil
mcanouil / demo.qmd
Last active February 2, 2024 23:36
Gist addressing the question to how to display an unknown number of cross-referenceable tables from Twitter/Mastodon.
<!--
# # MIT License
#
# Copyright (c) 2024 Mickaël Canouil
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# # MIT License
#
# Copyright (c) 2024 Mickaël Canouil
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@mcanouil
mcanouil / annot_islets.R
Last active February 2, 2024 23:34
Annotation Using Islets Regulome (https://www.nature.com/articles/s41588-019-0457-0)
# # MIT License
#
# Copyright (c) 2024 Mickaël Canouil
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: