Skip to content

Instantly share code, notes, and snippets.

@fvclaus
fvclaus / Yubikey as PIV in Firefox on Ubuntu.md
Last active September 18, 2023 09:35
Use Yubikey as PIV in Firefox on Ubuntu

Install yubikey-manager

sudo apt install yubikey-manager

Check output with ykman list. If it displays output like YubiKey 5 Nano (5.4.3) [OTP+FIDO+CCID] Serial: XXXXX then proceed to the next step. If your Yubikey is not recognized, maybe the following helps: https://support.yubico.com/hc/en-us/articles/360013708900-Using-Your-U2F-YubiKey-with-Linux. If you see a warning WARNING: PC/SC not available, you need to execute sudo systemctl start pcscd.service and sudo systemctl enable pcscd.service.

Compile yubikey-piv-tool

Go here https://developers.yubico.com/yubico-piv-tool/ and compile according to instructions. Test it with yubico-piv-tool -astatus.

@fvclaus
fvclaus / PDF Accessibilty Checker (PAC) on Linux with Wine.md
Created March 9, 2023 13:59
PDF Accessibilty Checker (PAC) on Linux with Wine

Download .NET and fonts

WINEPREFIX=~/.wine-pac wineboot --init
WINEPREFIX=~/.wine-pac winetricks --force dotnet48 allfonts

Installing corefonts is not enough

Download Gecko

Download correct Gecko version for your Wine installation from here: https://wiki.winehq.org/Gecko

@fvclaus
fvclaus / SQL Server Deadlocks.md
Created May 20, 2022 15:35
MSSQL SQL Server How to analyze and solve deadlocks

We start by looking at all current locks:

SELECT txt.text, 
  sysprocesses.spid,
  sysprocesses.blocked,
  CASE
      WHEN resource_type = 'OBJECT'
          THEN OBJECT_NAME(dm_tran_locks.resource_associated_entity_id)
       ELSE OBJECT_NAME(partitions.OBJECT_ID)
@fvclaus
fvclaus / README.md
Last active January 8, 2024 16:16
Run vscode tasks with nvm

Nvm does not work in vscode tasks, because tasks are run without a shell. .bashrc is not loaded and the nvm command is unknown.

My solution uses a wrapper script around /bin/bash that reads in the correct node version from .npmrc in the project folder.

#!/bin/bash

set -e

if [[ "$2" == nvm* ]]; then

export NODE_VERSION=v$(cat .nvmrc)