Skip to content

Instantly share code, notes, and snippets.

View username0x0a's full-sized avatar
🐡
πŸ™‰ πŸ™ˆ πŸ™Š

Michal Zelinka username0x0a

🐡
πŸ™‰ πŸ™ˆ πŸ™Š
View GitHub Profile
@sebjvidal
sebjvidal / NSView+RenderWithCARenderer.swift
Created January 24, 2026 13:24
NSView CARenderer Demo
extension NSView {
func renderWithCARenderer() -> NSImage? {
let width = Int(frame.width * 2)
let height = Int(frame.height * 2)
frame.origin = CGPoint(x: 0, y: 0)
let descriptor = MTLTextureDescriptor.texture2DDescriptor(pixelFormat: .rgba8Unorm, width: width, height: height, mipmapped: true)
descriptor.usage = [.shaderRead, .shaderWrite, .renderTarget]
let device = MTLCreateSystemDefaultDevice()!

Details on the iOS "PosterBoard" System, How "Posters" work, and the Basics of Messing With It

(Mainly written by Dulark and Dootskyre with some additional help by MWRevamped)


Overview

  • What is PosterBoard?
@leminlimez
leminlimez / Domains.md
Last active June 20, 2026 10:57
A deep dive into the iOS backup/restore system

Domains.plist

Documentation of /System/Library/Backup/Domains.plist. File taken from iOS 16.4 iPhone SE 3. The file was removed in iOS 17.0

Values

Values in the plist. Other than SystemDomains, these are not really important and are just here for preservation sake.

A domain in domains.plist contains keys that determine what gets backed up for what types of devices and where (i.e. iCloud vs iTunes). Not all domains have each key. The only 2 keys that must be in every domain are RootPath and RelativePathsToBackupAndRestore. Some domains have the value ShouldDigest. I am not sure exactly what it means but I have included it for documentation purposes.

  • Version: "24.0"
  • SystemDomains: (Dictionary), see below
@hackermondev
hackermondev / zendesk.md
Last active June 16, 2026 22:05
1 bug, $50,000+ in bounties, how Zendesk intentionally left a backdoor in hundreds of Fortune 500 companies

hi, i'm daniel. i'm a 15-year-old with some programming experience and i do a little bug hunting in my free time. here's the insane story of how I found a single bug that affected over half of all Fortune 500 companies:

say hello to zendesk

If you've spent some time online, you’ve probably come across Zendesk.

Zendesk is a customer service tool used by some of the world’s top companies. It’s easy to set up: you link it to your company’s support email (like support@company.com), and Zendesk starts managing incoming emails and creating tickets. You can handle these tickets yourself or have a support team do it for you. Zendesk is a billion-dollar company, trusted by big names like Cloudflare.

Personally, I’ve always found it surprising that these massive companies, worth billions, rely on third-party tools like Zendesk instead of building their own in-house ticketing systems.

your weakest link

@simonbs
simonbs / SwiftUIHostingConfiguration.md
Last active February 7, 2026 13:51
In iOS 16, Apple added UIHostingConfiguration, making it straightforward to use a SwiftUI view in instances of UICollectionViewCell and UITableViewCell. This project shows how UIHostingConfiguration can be backported to iOS 14 by implementing a type that conforms to the UIContentConfiguration protocol.

SwiftUIHostingConfiguration

In iOS 16, Apple added UIHostingConfiguration, making it straightforward to use a SwiftUI view in instances of UICollectionViewCell and UITableViewCell. This gist shows how UIHostingConfiguration can be backported to iOS 14 by implementing a type that conforms to UIContentConfiguration.

Starting from iOS 16, we can use SwiftUI views in an instance of UICollectionView or UITableViewCell like this:

cell.contentConfiguration = UIHostingConfiguration {
    ExampleCellContentView(color: Color(item.color), text: item.text)
}
@davidsteppenbeck
davidsteppenbeck / KeyframeView.swift
Created May 3, 2024 20:08
Keyframe Animation Example in SwiftUI
import SwiftUI
struct KeyframeValues {
var scale = 1.0
var horizontalStretch = 1.0
var verticalStretch = 1.0
var translation = 0.0
var rotation = Angle.zero
}
@dkun7944
dkun7944 / CDView.swift
Last active May 31, 2026 13:00
SwiftUI + Swift.Shader CD
//
// CDView.swift
// CD
//
// Created by Daniel Kuntz on 7/3/23.
//
import SwiftUI
struct ShapeWithHole: Shape {
@MorGuux
MorGuux / can-ids.csv
Last active May 9, 2026 06:51
BMW E90 KCAN Notes
CAN_ID_DEC CAN_ID_HEX CAN_ID_NAME MODULE_ID_DEC MODULE_ID_HEX NAME
0 0x00 unknown 0 0x00 Transmitter unknown
949 0x3B5 Status water valve [6] 120 0x78 IHKA
957 0x3BD Status consumer cut-off [2] 114 0x72 KBM
250 0xFA Control window regulator FAT [10] 0 0x0 KGM
251 0xFB Window regulator control BFT [5] 0 0x0 KGM
252 0xFC Window regulator control FATH [5] 114 0x72 KBM
253 0xFD Window regulator control BFTH [5] 114 0x72 KBM
168 0xA8 Torque 1 K-CAN [10] 18 0x12 DME1/DDE1
169 0xA9 Torque 2 [10) 18 0x12 DME1/DDE1
import AppKit
import SwiftUI
/*
Text("Menu")
.popUpMenu {
NSMenuItem(title: "One", action: nil, keyEquivalent: "")
NSMenuItem(title: "Two", action: nil, keyEquivalent: "")
}
*/
@saagarjha
saagarjha / remote_connection_enabler.mm
Created November 6, 2021 22:48
Enable remote connections in Quartz Debug
// If you haven't already, make sure to run this so the window list works:
// defaults write com.apple.QuartzDebug QuartzDebugPrivateInterface -bool YES
// https://gist.github.com/saagarjha/ed701e3369639410b5d5303612964557
#import "swizzler.h"
#import <AppKit/AppKit.h>
static Swizzler<void, id<NSApplicationDelegate>, NSNotification *> QuartzDebug_applicationDidFinishLaunching_ {
NSClassFromString(@"QuartzDebug"), @selector(applicationDidFinishLaunching:), [](auto self, auto notification) {
QuartzDebug_applicationDidFinishLaunching_(self, notification);