Skip to content

Instantly share code, notes, and snippets.

@janodev
janodev / default.md
Created June 22, 2025 07:13 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@janodev
janodev / gist:e53bac6df61d0b63ab7f2545781abd38
Created April 19, 2025 22:35 — forked from samhenrigold/gist:5b88f12283513d8808d8cc9b65bc47ee
`UIView.SystemAnimation.delete` demo playground
/// Video demo: https://hachyderm.io/@samhenrigold/114359529882977822
import UIKit
import PlaygroundSupport
final class DeleteDemoVC: UIViewController {
private let stack = UIStackView()
override func viewDidLoad() {
super.viewDidLoad()
/*
CoreDataErrors.h
Core Data
Copyright (c) 2004-2022, Apple Inc.
All rights reserved.
*/
#import <Foundation/NSObject.h>
/* NSError codes for Core Data added errors in NSCocoaErrorDomain. Foundation error codes can be found in <Foundation/FoundationErrors.h>. AppKit error codes can be found in <AppKit/AppKitErrors.h>.
@janodev
janodev / diagram.mermaid
Created October 19, 2024 11:26
Housing market
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@janodev
janodev / waitForExpectation.swift
Last active May 16, 2025 17:13
waitForExpectation
import Foundation
import Testing
func waitForExpectation(
timeout: Duration,
description: String,
fileID: String = #fileID,
filePath: String = #filePath,
line: Int = #line,
column: Int = #column,
@janodev
janodev / Makefile
Created July 17, 2024 17:17
Makefile to generate documentation for a SPM package
#!/bin/zsh -e -o pipefail
# THIS MAKEFILE GENERATES DOCUMENTATION FOR A PACKAGE.
# It assumes that your doc file is at Sources/<PackageName>/<PackageName>.docc/<PackageName>.md
GIT_USER := YourGitHubUser
PACKAGE_NAME := $(shell basename $(CURDIR))
PACKAGE_NAME_LOWER := $(shell echo $(PACKAGE_NAME) | tr '[:upper:]' '[:lower:]')
DOCC_DIR := Sources/$(PACKAGE_NAME)/$(PACKAGE_NAME).docc
DOCC_FILE := $(DOCC_DIR)/$(PACKAGE_NAME).md
@janodev
janodev / readMachOHeader.swift
Created July 3, 2024 13:07
Reads a Mach-O header
import Foundation
import MachO.dyld
func readMachOHeader(path: String) {
guard let data = try? Data(contentsOf: URL(fileURLWithPath: path)) else {
print("Failed to read file")
return
}
data.withUnsafeBytes { rawBufferPointer in
@janodev
janodev / viewtree.py
Last active June 19, 2024 21:38 — forked from avielg/viewtree.py
SwiftUI View Tree Graph
#!/opt/homebrew/bin/python3
import re
import glob
import os
import graphviz
import sys
## USAGE #########################################################################
@janodev
janodev / Testing.swift
Last active June 12, 2024 09:42
Summary of the Testing framework presented in WWDC 2024
/*
Sessions:
- Meet Swift Testing
https://www.youtube.com/watch?v=WFnkNcvLnCI
- Go further with Swift Testing
https://www.youtube.com/watch?v=bOvWGHi-BxI
There are three assertions that replace all XCTAssert functions: