Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / .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 / keybindings.json
Created December 24, 2020 19:05
Keyboard shortcuts for VS Code; %appdata%/code/user
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+enter",
"command": "workbench.action.terminal.runSelectedText"
}
]
@remlapmot
remlapmot / update-git-for-windows.ps1
Created January 14, 2021 15:17
Update git for Windows
git update-git-for-windows
@remlapmot
remlapmot / ntreset.ps1
Created February 9, 2021 08:37
Flush DNS and winsock reset - hopefully a fix for my network adaptor repeatedly disconnecting
ipconfig /flushdns
netsh winsock reset
@remlapmot
remlapmot / install-xml-from-source.R
Last active December 7, 2022 13:17
Install XML package from source on Windows 10 assuming Rtool40 installed
# In Rtools 4.0 run
# pacman -Syu
# pacman -S mingw-w64-{i686,x86_64}-libxml2
Sys.setenv(LOCAL_CPPFLAGS = "-I/mingw$(WIN)/include/libxml2")
Sys.setenv(LIB_XML = "$(MINGW_PREFIX)")
install.packages("XML")
@remlapmot
remlapmot / install-rcurl-from-source.R
Last active March 26, 2021 21:51
Install RCurl from source on Windows 10 assuming Rtools40 installed
# In Rtools 4.0 run
# pacman -Syu
# pacman -S mingw-w64-{i686,x86_64}-curl
# pkg-config --libs libcurl
install.packages("RCurl")
@remlapmot
remlapmot / rstan-linux-config.R
Last active April 1, 2021 09:54
rstan compiler on Ubuntu
# In Terminal install clang
# sudo apt-get install clang
dotR <- file.path(Sys.getenv("HOME"), ".R")
if (!file.exists(dotR)) dir.create(dotR)
M <- file.path(dotR, "Makevars")
if (!file.exists(M)) file.create(M)
cat("\nCXX14FLAGS=-O3 -march=native -mtune=native -fPIC",
"CXX14=clang++", # g++ # or clang++ but you may need a version postfix
file = M, sep = "\n", append = TRUE)