Install pdftk
Dump the metadata of the pdf file:
pdftk [pdf_to_update] dump_data_utf8 > meta.txt
Set-PSReadlineOption -EditMode Emacs | |
Set-Alias vim nvim | |
Set-Alias python3 python | |
# Some unix shell hacks | |
Function which([string]$Name) { Get-Command $Name } | |
Function open($Name) { start $name } | |
Function l() {ls -Force} | |
# Git shortcuts from zsh git plugin |
import asyncio | |
import subprocess | |
from fastapi import FastAPI, WebSocket | |
from fastapi.responses import HTMLResponse | |
def nvidia_smi(): | |
try: | |
msg = subprocess.run( |
upstream nb { | |
server 10.19.0.10:1234; | |
} | |
server { | |
server_name example.com; | |
location / { | |
proxy_pass http://nb; | |
proxy_set_header Host $host; |
#!/bin/bash | |
# Installs the nightly NeoVim app image to /opt and symlink to /usr/local/bin | |
# This is the easiest way to install NeoVim nightly on a distro that doesn't package it. | |
# Should be run as root | |
if [ "${EUID:-$(id -u)}" -ne 0 ]; then | |
echo Please run as root. | |
exit 1 | |
fi |
#!/usr/bin/env python3 | |
"""Asynchronously download a list of links.""" | |
from typing import Iterable | |
import asyncio | |
import logging | |
import pathlib | |
import sys | |
import aiofiles |
Nvidia drivers don't yet support linux kernel 5.9.* and a power outage in my house caused my server running Debian Testing (Bullseye) to reboot and upgrade to the latest kernel. The prices I pay for up-to-date software . . .
To use my Nvidia card I have to downgrade to the 5.8.0 kernel. I use the simple and reliable solution below. You need to be able to plug a display and keyboard into your machine though for the last part.
/etc/default/grub
. This tells GRUB to save whatever setting you change on the GRUB screen during boot.GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=saved
Remove any existing nvidia packages. (Note: Run this in bash, as the wildcard input to apt-get doesn't work in zsh)
sudo apt-get purge nvidia*
Update package listing and upgrade packages.
sudo apt update