posts

moving to Québec

We just moved our family from Utah, USA, to Montréal, Québec, Canada. I entered Canada on August 18, 2021 by car, and my wife and daughter entered a few days later by air. The process actually began on April 27 when I got my acceptance letter to the Université de Montréal as a master’s student in the Département d’informatique et de recherche opérationelle. After a few days of scrambling to find out if I would be able to study there without knowing French (turns out you can as a grad student at DIRO!), I started the process of applying to enter Canada and live in Québec as a student.
Read more

Jupyter Lab Hub in Docker with Nvidia GPU support

This is how I set up my headless home server with a Jupyter Lab Docker container with an Nvidia GPU runtime. Login is handled by a GitHub OAuth application. Nvidia drivers and the container runtime permalink First, check here (replacing the CUDA version in the URL with your own) to see which Nvidia drivers you need for the CUDA toolkit version you want. I’m using CUDA 11.4.2, which means I need at least driver version 470.You can use sudo apt purge nvidia-* to cleanly remove older drivers (or broken installs) before installing the desired version.
Read more

Minecraft in Docker

This guide shows how to host multiple Minecraft servers on a single machine with docker-compose. mkdir minecraft_server cd minecraft_server mkdir data/ wget /post/minecraft/docker-compose.yml \ -O docker-compose.yml This docker-compose setup uses itzg’s Docker image, which you see further documentation for here. If you’re moving from a vanilla Minecraft world, do the following to get the different world directories in the right position: cp -r ${OLD}/world data/server/world mkdir data/server/world_{nether,the_end} mv data/server/world/DIM-1 data/server/world_nether/DIM-1 mv data/server/world/DIM1 data/server/world_the_end/DIM1 Here’s the map from vanilla Minecraft directories to Spigot directories (which is what itzg’s container uses):
Read more

Matrix setup with Synapse, Postgres, Maubot, and matrix-registration

This is how I set up my own Matrix server with Docker.These instructions were originally for ARM, back when I ran this server on a Raspberry Pi. Unfortunately, the Matrix community stopped releasing ARM images, so the latest version that will work on ARM without QEMU is v1.26.0, which is very old now. These instructions have been updated to use amd64 images, but I’ll preserve the references to ARM images as comments. If you’re going to work from a Pi, be sure to switch it to run in 64-bit mode for optimal performance: echo 'arm_64bit=1' | sudo tee -a /boot/config.txt && sudo systemctl reboot. There is an Ansible playbook that’s quite popular, but I host a lot of other services with Docker on the same server and I wanted to continue managing all of them together, just with docker-compose.
Read more

I really just want to edit and compile my LaTeX files in VS Code

LaTeX has a ton of different flavors, releases, and installations: MacTeX, MiKTeX, TeXworks, XeTeX, pdfTeX, LuaTeX… If you’re using Linux and just want to edit LaTeX files in Visual Studio Code and have them automatically rendered as PDFs, follow these instructions: On Arch-based distros, install the packages listed here. On Debian-based systems, sudo apt install texlive. Install some Perl dependencies: sudo cpan Log::Log4perl Log::LogDispatch Log::Dispatch::File YAML::Tiny File::HomeDir If you want to use FontAwesome on Arch-based systems, install the oft-font-awesome package and then do the following (source): sudo ln -s /usr/share/fontconfig/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/09-texlive-fonts.conf fc-cache && mkfontscale && mkfontdir On Debian-based systems, install the font package with apt: sudo apt install texlive-fonts-recommended texlive-fonts-extra Install the VS Code extension called “LaTeX Workshop”. If you want to use the fontspec package and get an error saying that “the fontspec package requires either XeTeX or LuaTex”, add the magic command % !TEX program = xelatex to the top of your .tex file. If your installation needed to add some paths to your PATH but VS Code isn’t seeing them, try opening VS Code from the shell (with code path/to/workspace) so that it inherits $PATH from the interactive shell. (There might be a way to change the bin path in the settings for LaTeX Workshop, but I haven’t needed to find that setting yet.)