Skip to content

Instantly share code, notes, and snippets.

View spookyd's full-sized avatar

Luke Davis spookyd

  • San Fransisco, CA
View GitHub Profile
@chriseidhof
chriseidhof / viewmirror.swift
Last active December 18, 2025 12:17
View Mirror
import SwiftUI
struct ContentView: View {
var body: some View {
HStack {
Text("Hello")
.padding()
.background(.blue)
.overlay {
Color.yellow
@martinheld
martinheld / GraphQL introspection query via curl.md
Last active August 15, 2025 00:10
GraphQL introspection query via curl

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@raheelahmad
raheelahmad / custom-presentation.swift
Created May 14, 2019 22:16
Custom Presentation basics with UIPresentationController and friends
/// The ring leader
final class ModalTransitioningDelegate: NSObject, UIViewControllerTransitioningDelegate {
func presentationController(
forPresented presented: UIViewController,
presenting: UIViewController?,
source: UIViewController
) -> UIPresentationController? {
return PresentationController(presentedViewController: presented, presenting: presenting)
}
@spookyd
spookyd / iOS-Argument_cheatsheet.md
Last active May 8, 2021 11:30
Cheat sheet for iOS Project arguments

Application Argument Debug Cheat Sheet


A curated list of arguments that can be used for enabling tools on iOS development.

Launch Arguments

Core Data

@abstractart
abstractart / books.md
Last active February 24, 2026 02:11
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active February 5, 2026 06:11
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@tartakovsky
tartakovsky / UIView+Mask.swift
Created October 7, 2016 12:15
UIView+Mask.swift
// Mask UIView with rect/path
// inverse = false: part inside rect is kept, everything outside is clipped
// inverse = true: part inside rect is cut out, everything else is kept
//
// Usage:
//
// // - Cuts rectangle inside view, leaving 20pt borders around
// let rect = CGRect(x: 20, y: 20, width: bounds.size.width - 20*2, height: bounds.size.height - 20*2)
// targetView.mask(withRect: rect, inverse: true)
//
@vasanthk
vasanthk / System Design.md
Last active March 13, 2026 10:40
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?
@carcinocron
carcinocron / debugger pause beforeunload
Last active July 22, 2025 08:53
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)