Skip to content

Instantly share code, notes, and snippets.

View miharekar's full-sized avatar

Miha Rekar miharekar

View GitHub Profile
require "strscan"
class Scanner
TOK = []
TOK["{".ord] = :LBRACE; TOK["}".ord] = :RBRACE; TOK[";".ord] = :SEMI
def initialize data
@scan = StringScanner.new data
@prev_pos = @scan.pos
end

Apple Studio Display Setup on Arch Linux with Hyprland

Problem Description

Apple Studio Display (5K) on Arch Linux with Hyprland was experiencing intermittent connection issues where:

  • Display would not always connect reliably
  • System detected the display as two separate devices
  • Wrong display connector was sometimes chosen

System