Skip to content

Instantly share code, notes, and snippets.

View remlapmot's full-sized avatar
I am currently on annual leave - I may be slow to respond.

Tom Palmer remlapmot

I am currently on annual leave - I may be slow to respond.
View GitHub Profile
# Amendment from
CheckLazyDataCompression <- function(pkg)
pkg_name <- sub("_.*", "", pkg)
lib <- tempfile(); dir.create(lib)
zs <- c("gzip", "bzip2", "xz")
res <- double(3); names(res) <- zs
for (z in zs) {
opts <- c(paste0("--data-compress=", z),
remlapmot /
Created April 2, 2024 10:38
Installing Java on Apple Silicon macOS for rJava R package to work
brew install temurin
remlapmot / settings.json
Last active April 3, 2024 11:05
Zed settings
// Zed settings
// For information on how to configure Zed, see the Zed
// documentation:
// 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.
"theme": "Rosé Pine Moon",
remlapmot /
Created November 22, 2023 14:36
Open second instance of an app on macOS
open -n -a
remlapmot /
Created November 16, 2023 11:43
When GitHub Desktop hangs doing a squash or rebase
git rebase --abort
remlapmot / .gvimrc
Last active November 5, 2023 19:22
Settings for MacVim
colorscheme shine
set guifont=Fira\ Code:h13
remlapmot / update-packages.R
Created September 22, 2023 12:58
Solution to: Warning: package '#' in library '/usr/lib/R/library' will not be updated
# Solution to Linux warning message
# Warning: package '#' in library '/usr/lib/R/library' will not be updated
update.packages(oldPkgs = old.packages())
remlapmot /
Created March 10, 2023 12:39
Hot swap BLAS and LAPACK for use with R on Debian/Ubuntu
#!/usr/bin/env bash
# OpenBLAS serial
sudo apt-get install libopenblas-serial-dev
sudo update-alternatives --set /usr/lib/x86_64-linux-gnu/openblas-serial/
sudo update-alternatives --set /usr/lib/x86_64-linux-gnu/openblas-serial/
# OpenBLAS pthread
# sudo apt-get install libopenblas-base
# sudo update-alternatives --set /usr/lib/x86_64-linux-gnu/openblas-pthread/
remlapmot / test-twosamplemr-install.R
Created February 9, 2023 20:07
Test installation methods for TwoSampleMR package
#' ---
#' title: "Test TwoSampleMR installation methods"
#' date: "2023-02-09"
#' output: html_document
#' ---
remlapmot / fix-tinytex.bat
Created January 11, 2023 12:39
Fix TinyTeX on Windows to find external Ghostscript installation resources; run as Admin in Command Prompt
mklink %APPDATA%\TinyTeX\tlpkg\tlgs\Resource\Init\Fontmap "%ProgramFiles(x86)%\gs\gs9.56.1\Resource\Init\Fontmap"
mklink %APPDATA%\TinyTeX\tlpkg\tlgs\Resource\Init\Fontmap.GS "%ProgramFiles(x86)%\gs\gs9.56.1\Resource\Init\Fontmap.GS"
rd /s /q %APPDATA%\TinyTeX\tlpkg\tlgs\Resource\Font
mklink /d %APPDATA%\TinyTeX\tlpkg\tlgs\Resource\Font "%ProgramFiles(x86)%\gs\gs9.56.1\Resource\Font"