Skip to content

Instantly share code, notes, and snippets.

View jessestricker's full-sized avatar

Jesse Stricker jessestricker

  • Hamburg, Germany
  • 08:36 (UTC +02:00)
View GitHub Profile
@jessestricker
jessestricker / README.md
Last active September 14, 2023 16:37
KaTeX support for rustdoc

KaTeX support for rustdoc

To install, place both files in the .cargo directory next to your Cargo.toml file.

<project-dir>
├ .cargo/
│ ├ config.toml
│ └ katex.html
@jessestricker
jessestricker / printers.py
Created July 14, 2023 07:14
printing tables and trees
from collections.abc import Callable, Collection, Iterable
from enum import Enum
from typing import TypeVar
class Alignment(Enum):
LEFT = "<"
CENTER = "^"
RIGHT = ">"
@jessestricker
jessestricker / unicode-symbols.md
Last active January 3, 2024 14:50
A collection of the most useful Unicode symbols, which are not easily available on common keyboard layouts.

Unicode symbols

A collection of the most useful Unicode symbols, which are not easily available on common keyboard layouts.

Punctuation

Glyph Name USV
En Dash U+2013
@jessestricker
jessestricker / update_wallpaper.py
Created April 17, 2023 14:30
Update the GNOME desktop wallpaper with a random image from Unsplash.
#! /usr/bin/env python3
import argparse
import logging
import subprocess
from pathlib import Path
import dbus
import requests
@jessestricker
jessestricker / football_betting_points.py
Created January 7, 2023 21:20
Calculates the awarded points for a football betting game.
from builtins import int, tuple, max
Result = tuple[int, int]
def points(game: Result, bet: Result) -> int:
"""
Calculates the awarded points for a given game result and bet.
- If the bet is exactly the same as the game result, 10 points are awarded.
@jessestricker
jessestricker / VMware Workstation Player VM Config.md
Last active November 22, 2022 10:35
VMware Workstation configuration options, not available via GUI in the free Player variant.

VMware Workstation Player VM Config

Add the following lines to the .vmx file, which describes the VM.
These settings were tested with VMware Workstation Player v17.

VMX Reference (slightly outdated)

5-Button Mouse

@jessestricker
jessestricker / Microsoft.PowerShell_profile.ps1
Last active October 13, 2022 10:59
Windows PowerShell Profile
function Test-FileHash {
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string] $Path,
[Parameter(Mandatory)]
[string] $Hash,
[ValidateSet("SHA1", "SHA256", "SHA512")]
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string] $Path,
[Parameter(Mandatory)]
[string] $Hash,
[ValidateSet("SHA1", "SHA256", "SHA512")]
[string] $Algorithm = "SHA256"
@jessestricker
jessestricker / color.go
Created September 21, 2022 17:50
Hexe Color Model
package hexe
import (
"math"
hsluv "github.com/hsluv/hsluv-go"
)
// Color defines an 8-bit packed color value in the HSLuv color space.
type Color uint8