Skip to content

Instantly share code, notes, and snippets.

View imjhk03's full-sized avatar
πŸ€’
Injured, but still vibing

Joohee Kim imjhk03

πŸ€’
Injured, but still vibing
View GitHub Profile
#!/usr/bin/env bun
"use strict";
const fs = require("fs");
const { execSync } = require("child_process");
const path = require("path");
// ANSI color constants
const c = {
cy: '\033[36m', // cyan
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active March 13, 2026 10:04
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@christianselig
christianselig / LongPressButton.swift
Last active February 8, 2026 18:19
How to accomplish a long-pressable button in SwiftUI with two different techniques. The first just uses SwiftUI but due to the simultaneous gesture requirement you also have to ensure both don't fire concurrently. The second uses UIKit and wraps UIButton and UILongPressGestureRecognizer which natively handles this behavior.
import SwiftUI
// PURE SwiftUI way with State tracking to prevent double events
struct ContentView: View {
@State private var ignoreTapEvent = false
var body: some View {
Button {
guard !ignoreTapEvent else {
@amirdew
amirdew / ModifyCodable.swift
Last active May 29, 2024 06:05
Modifying private and immutable properties (let) in Codable instances
import Foundation
extension Decodable where Self: Encodable {
/// Creates a new instance and changes the value for the provided key.
///
/// - Parameters:
/// - key: The key path to the property that you want to modify.
/// Use period to separate levels and [] for indexes.
/// Examples: "id", "name.firstName", "children[2].name.firstName"
///
@DougGregor
DougGregor / macros.md
Last active February 20, 2026 17:39
A possible vision for macros in Swift

A Possible Vision for Macros in Swift

As Swift evolves, it gains new language features and capabilities. There are different categories of features: some fill in gaps, taking existing syntax that is not permitted and giving it a semantics that fit well with the existing language, with features like conditional conformance or allowing existential values for protocols with Self or associated type requirements. Others introduce new capabilities or paradigms to the language, such as the addition of concurrency or comprehensive reflection.

There is another large category of language features that provide syntactic sugar to eliminate common boilerplate, taking something that can be written out in long-form and making it more concise. Such features don't technically add any expressive power to the language, because you can always write the long-form version, but their effect can be transformational if it enables use cases that would otherwise have been unwieldy. The synthesis of Codable conformances, for ex

@bjhomer
bjhomer / cross-view-lines.swift
Last active February 23, 2026 21:27
Creating cross-view lines in SwiftUI
//
// ContentView.swift
// SwiftUIPlayground
//
// Created by BJ Homer on 4/26/21.
//
import SwiftUI
@longfin
longfin / writing.md
Last active March 4, 2026 05:23
μ—”μ§€λ‹ˆμ–΄λ₯Ό μœ„ν•œ κΈ€μ“°κΈ°

이 글은 Heinrich Hartmann λ‹˜μ΄ μž‘μ„±ν•˜μ‹  글을 ν•œκ΅­μ–΄λ‘œ λ²ˆμ—­ν•œ κ²ƒμž…λ‹ˆλ‹€. 원문은 https://www.heinrichhartmann.com/posts/writing/ μ—μ„œ ν™•μΈν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€.


κΈ€μ“°κΈ°λŠ” 큰 μ‘°μ§μ—μ„œ 영ν–₯λ ₯을 λ°œνœ˜ν•˜λŠ” 데 μ€‘μš”ν•©λ‹ˆλ‹€. κ²½λ ₯ μžˆλŠ” μ†Œν”„νŠΈμ›¨μ–΄ μ—”μ§€λ‹ˆμ–΄λ‘œμ„œμ˜ κΈ€μ“°κΈ°λŠ” 직무 λ²”μœ„λ₯Ό ν™•μž₯ν•˜κ³  κ²½λ ₯을 λ°œμ „μ‹œν‚€κΈ° μœ„ν•΄ νšλ“ν•΄μ•Ό ν•˜λŠ” κ°€μž₯ μ€‘μš”ν•œ κΈ°μˆ μž…λ‹ˆλ‹€.

κΈ€μ“°κΈ°λŠ” μ–΄λ ΅μŠ΅λ‹ˆλ‹€. λ§Žμ€ μ†Œν”„νŠΈμ›¨μ–΄ μ—”μ§€λ‹ˆμ–΄λ“€μ΄ 글쓰기와 μ”¨λ¦„ν•˜μ£ . 저도 개인적으둜 문학에 λŒ€ν•œ 관심이 μ—†κΈ° λ•Œλ¬Έμ— κΈ€μ“°κΈ°κ°€ μžμ—°μŠ€λŸ½μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

@trustin
trustin / git-trigger-build.sh
Last active April 4, 2025 05:46
git-trigger-build: Triggers a CI build by pushing an empty commit
#!/bin/bash -e
# Stash the staged files if any.
NEEDS_UNSTASH=0
if ! git diff --staged --exit-code >/dev/null; then
echo -ne '\033[1;32m'
echo -n 'Stashing the staged files'
echo -e '\033[0m'
git stash
NEEDS_UNSTASH=1
extension UIHostingController {
convenience public init(rootView: Content, ignoreSafeArea: Bool) {
self.init(rootView: rootView)
if ignoreSafeArea {
disableSafeArea()
}
}
func disableSafeArea() {
@DreamingInBinary
DreamingInBinary / Best in Class iOS Checklist
Last active February 1, 2026 14:46
This is a public checklist updated every year after the latest version of iOS and iPadOS are shipped. It's a boiled down version of a "Best in Class" app checklist created by Jordan Morgan.
# A Best in Class Checklist
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10.
> To use this, create a Github Issue in your own repo, and simply copy and paste this text.
## iOS Core Technology
_Things any iOS app can benefit from_
- [ ] iCloud Sync
- [ ] Focus Filter Support