Skip to content

Instantly share code, notes, and snippets.

View mcanouil's full-sized avatar

Mickaël Canouil mcanouil

View GitHub Profile
@mcanouil
mcanouil / count-cite.lua
Created March 28, 2025 21:27
Count citation and display the counts in log
# MIT License
# Copyright (c) 2025 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 / create-extension.sh
Created March 24, 2025 15:49
Script to create a new repository for a Quarto extension using a template repository
#!/usr/bin/env bash
# MIT License
# Copyright (c) 2025 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
@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
@mcanouil
mcanouil / clean-twitter.r
Last active February 2, 2024 23:33
Script to remove all likes and remove tweets older than 30 days
# # 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:
# # 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:
@mcanouil
mcanouil / make_design.R
Last active February 2, 2024 23:34
Build a plate/batch design and export it as a PDF image and Excel spreadsheet
# # 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 / hba1c_percent_to_mmoll.R
Last active February 2, 2024 23:34
HbA1c Percent to mmol/L
# # 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 / bmi_to_zscore.R
Last active February 2, 2024 23:34
BMI to Z-score
# # 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: