Skip to content

Instantly share code, notes, and snippets.

View BenziAhamed's full-sized avatar
🏠
Working from home

Benzi BenziAhamed

🏠
Working from home
  • Meta
  • London, UK
View GitHub Profile
@BenziAhamed
BenziAhamed / ChatRoom.swift
Created February 27, 2019 12:41
Simulates a chat room
import Cocoa
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution = true
struct ChatMessage {
let id: String
let senderId: String
let message: String
let timestamp: Double
@BenziAhamed
BenziAhamed / Shortcut.swift
Created February 8, 2023 16:18
Parsing and rendering macOS shortcuts
import Cocoa
fileprivate let modifierMap = [
"cmd": "⌘",
"command": "⌘",
"shift": "⇧",
"control": "^",
"ctrl": "^",
"opt": "⌥",
"option": "⌥",