Skip to content

Instantly share code, notes, and snippets.

View lgatto's full-sized avatar

Laurent Gatto lgatto

View GitHub Profile
@lgatto
lgatto / pull_many.el
Last active January 11, 2023 18:39
Pulls and pushes a few github repos in bash and elisp
;; Pulls and pushes a few github repos from emacs
;; Laurent Gatto (https://github.com/lgatto)
;; Thanks to Stephen J. Eglen for his help in redirecting to a
;; dedicated buffer (https://github.com/sje30)
(setq git-dirs '(
"~/wd"
"~/bin"
"~/Documents/org"
"~/Documents/roam"
@lgatto
lgatto / R4MS_install.R
Last active July 24, 2024 06:11
RforMassSpectrometry book installation script
## Installation instructions for the R for Mass Spectrometry tutorial
## https://rformassspectrometry.github.io/book/
## Install packages
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("tidyverse", ask = FALSE)
BiocManager::install("factoextra", ask = FALSE)
@lgatto
lgatto / yank-bibtex-from-doi.el
Created January 27, 2024 16:22
Create and yank bibtex entry from a DOI
(defun yank-bibtex-from-doi ()
"Create and yank bibtex entry from a DOI."
(interactive)
;; read the doi from minibuffer
(setq doi (read-from-minibuffer "doi: "))
;; define the curl shell command
(setq cmd
(concat
"curl -LH \"Accept: application/x-bibtex\" "
"https://doi.org/"
@lgatto
lgatto / gird.R
Last active February 18, 2024 10:43
Reproducing The Grid exhibition poster
## See https://lgatto.github.io/the-grid-in-r/
plotSquare <- function(x, y, width) {
x1 <- x - (width / 2)
y1 <- y - (width / 2)
x2 <- x1 + width
y2 <- y1 + width
rect(x1, y1, x2, y2)
}