Skip to content

Instantly share code, notes, and snippets.

@remlapmot
remlapmot / install-choco.ps1
Last active March 30, 2020 16:17
Powershell script to install chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
@remlapmot
remlapmot / libpng12-0-install.sh
Last active June 7, 2025 20:09
Instal libpng12-0 on Ubuntu 18.04
sudo wget http://se.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
sudo dpkg -i libpng12-0_1.2.54-1ubuntu1_amd64.deb
@remlapmot
remlapmot / rstudio-prefs.json
Last active April 13, 2020 09:36
RStudio v1.3 preferences file. File location on Windows: %appdata%\RStudio
{
"panes": {
"quadrants": [
"Source",
"Console",
"TabSet1",
"TabSet2"
],
"tabSet1": [
"Environment",
@remlapmot
remlapmot / default.R
Last active February 20, 2022 19:22
Default R script template for RStudio. File location: %appdata%\rstudio\templates; on Mac/Linux: ~/.config/rstudio/templates
#' ---
#' title: "Title"
#' author: "My Name"
#' date: ""
#' output: html_document
#' ---
@remlapmot
remlapmot / .wslconfig
Last active March 31, 2020 22:21
WSL 2 configuration file - to limit the amount of RAM the Vmmem process uses. File location: %userprofile%
[wsl2]
# kernel=<path> # An absolute Windows path to a custom Linux kernel.
memory=4GB # How much memory to assign to the WSL2 VM.
# processors=<number> # How many processors to assign to the WSL2 VM.
swap=0GB # How much swap space to add to the WSL2 VM. 0 for no swap file.
# swapFile=<path> # An absolute Windows path to the swap vhd.
# localhostForwarding=<bool> # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host via localhost:port (default true).
# <path> entries must be absolute Windows paths with escaped backslashes, for example C:\\Users\\Ben\\kernel
# <size> entries must be size followed by unit, for example 8GB or 512MB
@remlapmot
remlapmot / install-pdfarranger.sh
Last active March 25, 2020 17:29
Install pdfarranger on Ubuntu
sudo add-apt-repository ppa:linuxuprising/apps
sudo apt update
sudo apt install pdfarranger
@remlapmot
remlapmot / install-rstudio-ubuntu.sh
Last active August 20, 2020 07:28
Install RStudio on Ubuntu using gdebi in the Terminal. Note download the deb file from the RStudio website first.
# sudo apt-get install gdebi-core
# sudo gdebi rstudio-1.3.923-amd64.deb
sudo dpkg -i rstudio-1.3.1019-amd64.deb
@remlapmot
remlapmot / default.Rmd
Last active February 7, 2024 11:51
Default R Markdown file to use in RStudio (from v1.3). File location: %appdata%\rstudio\templates ; on Mac/Linux: ~/.config/rstudio/templates
---
title: "Title"
author: "My Name"
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
html_document:
toc: true
toc_float:
collapsed: false
smooth_scroll: false
@remlapmot
remlapmot / ubuntu.xlaunch
Last active March 21, 2021 23:52
XLaunch file for running a windowed desktop environment for Ubuntu (or another Linux Distro) on WSL
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="Windowed" ClientMode="NoClient" LocalClient="False" Display="-1" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="-swcursor -ac" Wgl="True" DisableAC="False" XDMCPTerminate="False"/>
@remlapmot
remlapmot / fork-sync.sh
Last active April 8, 2021 12:55
Sync a forked repo with the upstream master branch - both locally and on GitHub (origin)
git fetch upstream
git checkout master
git merge upstream/master
git push origin master
# git reset --hard upstream/master
# git push origin master --force
# or
git pull upstream master
git push origin master