Skip to content

Instantly share code, notes, and snippets.

@remlapmot
remlapmot / .vimrc
Created July 15, 2020 19:12
Vim config file
set guifont=Fira\ Code:h9
call plug#begin('~/.vim/plugged')
Plug 'kristijanhusak/vim-hybrid-material'
call plug#end()
set background=dark
colorscheme hybrid_material
:set lines=50 columns=125
@remlapmot
remlapmot / convert.ps1
Created June 28, 2020 15:34
Convert an .mkv file to an h.265 .mp4
ffmpeg -i "fileprefix.mkv" -c:v libx265 "fileprefix.mp4"
@remlapmot
remlapmot / winget-install.ps1
Last active September 8, 2020 17:01
winget commands to install some programs I use on Windows 10
winget install notepads
winget install notepad++
winget install jabref
winget install quicklook
winget install chrome
winget install sumatrapdf
winget install vcxsrv
winget install visual studio code
winget install visual studio community
winget install windows terminal
@remlapmot
remlapmot / npp-context-menu.reg
Last active September 8, 2020 17:02
Windows Explorer right click context menu entries for Notepad++: open folder as workspace and open as folder
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\Notepad++ FaW]
"Icon"="C:\\Program Files\\Notepad++\\notepad++.exe,0"
[HKEY_CLASSES_ROOT\Folder\shell\Notepad++ FaW\command]
@="C:\\Program Files\\Notepad++\\notepad++.exe -openFoldersAsWorkspace open: \"%1\""
;----------------;
[HKEY_CLASSES_ROOT\Folder\shell\Open folder in Notepad++]
@remlapmot
remlapmot / .Renviron
Last active April 9, 2025 06:46
.Renviron file which sets environment variables in an R session
# GITHUB_PAT=# use gitcreds instead
# delete .tar.gz after checking package
R_KEEP_PKG_SOURCE=no
# first download JAVA JDK
JAVA_HOME="C:/Program Files/Java/jdk-16.0.1"
# first download and install JAGS
JAGS_HOME="C:/Program Files/JAGS/JAGS-4.3.0"
@remlapmot
remlapmot / fix-tag-error.bat
Created April 17, 2020 19:11
Fix "tag present in the reparse point buffer is invalid" OneDrive Error
chkdsk /r /f
@remlapmot
remlapmot / .Rprofile
Last active October 11, 2023 19:37
Personal R settings file.
# rstan::rstan_options(auto_write = TRUE)
if (Sys.info()["sysname"] == "Windows"){
# For improved execution time, we recommend calling
Sys.setenv(LOCAL_CPPFLAGS = '-march=corei7 -mtune=corei7')
}
# don't ask to save workspace on quit; `q()`
# utils::assignInNamespace(
# "q",
# function(save = "no", status = 0, runLast = TRUE)
@remlapmot
remlapmot / local.conf
Created April 12, 2020 09:05
Allow WSL to use fonts installed on Windows. File location: /etc/fonts
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/mnt/c/Windows/Fonts</dir>
</fontconfig>
REM Launch an X11 window
start /B ubuntu-nodec.xlaunch
REM Start pulseaudio
start "" /B "C:\bin\pulseaudio-1.1\bin\pulseaudio.exe"
REM For WSL 1
REM ubuntu1804.exe run "if [ -z \"$(pidof mate-session)\" ]; then export DISPLAY=127.0.0.1:0.0; export PULSE_SERVER=tcp:127.0.0.1; mate-session; pkill '(gpg|ssh)-agent'; taskkill.exe /IM pulseaudio.exe /F; taskkill.exe /IM vcxsrv.exe; fi;"
REM For WSL 2
@remlapmot
remlapmot / install-mate-desktop.sh
Last active March 27, 2025 12:59
Install MATE desktop on WSL 2
sudo apt update && sudo apt upgrade -y
sudo apt install ubuntu-mate-desktop --no-install-recommends -y
sudo apt-get install mate-desktop-environment-extras
sudo dpkg-reconfigure dbus && sudo service dbus restart
# install missing icons
sudo apt install ubuntu-mate-icon-themes
# install fira code font
sudo apt install fonts-firacode