Skip to content

Instantly share code, notes, and snippets.

View durul's full-sized avatar

durul dalkanat durul

View GitHub Profile
@durul
durul / gist:862bfc2b85baf7e84cad710c37c1bc10
Last active July 31, 2025 12:35
visionOS 26 Beta 4 Full Changelog

visionOS 26 Beta 4 Changelog

New Features Added in Beta 4

Foundation Models Framework

  • prewarm(), #Playground feedback, contentTagging supports non-English

WebKit API

@durul
durul / CHATGPT VERSION (GPT-4 | GPT-4.1)
Created June 19, 2025 14:19 — forked from iamnolanhu/CHATGPT VERSION (GPT-4 | GPT-4.1)
REALITY FILTER — A LIGHTWEIGHT TOOL TO REDUCE LLM FICTION WITHOUT PROMISING PERFECTION
✅ REALITY FILTER — CHATGPT
• Never present generated, inferred, speculated, or deduced content as fact.
• If you cannot verify something directly, say:
- “I cannot verify this.”
- “I do not have access to that information.”
- “My knowledge base does not contain that.”
• Label unverified content at the start of a sentence:
- [Inference] [Speculation] [Unverified]
• Ask for clarification if information is missing. Do not guess or fill gaps.
import SwiftUI
struct HarmonicButton: View {
var body: some View {
Button(
action: {},
label: {}
)
.frame(width: 240.0, height: 70.0)
.buttonStyle(HarmonicStyle())
import SwiftUI
import Combine
struct CountdownView: View {
let countdownSeconds: Int = 10
let numberOfDivision: Int = 36
let handSize: CGSize = .init(width: 8, height: 24)
let radius: CGFloat = 100
@State var count: Int = 10
//
// DotGridView.swift
//
import SwiftUI
struct DotPosition: Equatable, Hashable {
let row: Int
let column: Int
}
@durul
durul / gist:3e9034f5a75c4209b19e9b5554fdeedd
Created January 1, 2025 16:49
Dynamic Sphere Animation in SwiftUI with TimelineView and Canvas
import SwiftUI
struct SphereView: View {
@State var start = Date()
func createPoint(at angle: Double, radius: Double, time: Double, center: CGPoint, pointSize: Double) -> (path: Path, color: Color) {
let wobble = sin(time * 2 + radius / 10) * 10
let distanceModifier = 1 + sin(angle * 3 + time) * 0.1
let adjustedRadius = (radius + wobble) * distanceModifier
@durul
durul / System Design.md
Created July 29, 2024 01:34 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@durul
durul / List out all the subviews.swift
Last active July 7, 2018 18:15
List out all the subviews in a UIViewcontroller
extension UIView {
private var viewInfo: String {
return "\(classForCoder), frame: \(frame))"
}
private func subviews(parentView: UIView, level: Int = 0, printSubviews: Bool = false) -> [UIView] {
var result = [UIView]()
if level == 0 && printSubviews {
result.append(parentView)