Skip to content

Instantly share code, notes, and snippets.

View derekc00's full-sized avatar

Derek Chang derekc00

View GitHub Profile
#!/usr/bin/env zsh
# Multi-project worktree manager with Claude support
#
# ASSUMPTIONS & SETUP:
# - Your git projects live in: ~/projects/
# - Worktrees will be created in: ~/projects/worktrees/<project>/<branch>
# - New branches will be named: <your-username>/<feature-name>
#
# DIRECTORY STRUCTURE EXAMPLE:
# ~/projects/
@derekc00
derekc00 / 01-GettingStarted-SharedState[BindableState Attempt].swift
Last active November 13, 2022 06:32
01-GettingStarted-SharedState[BindableState Attempt].swift
import ComposableArchitecture
import SwiftUI
private let readMe = """
This screen demonstrates how multiple independent screens can share state in the Composable \
Architecture. Each tab manages its own state, and could be in separate modules, but changes in \
one tab are immediately reflected in the other.
This tab has its own state, consisting of a count value that can be incremented and decremented, \
as well as an alert value that is set when asking if the current count is prime.
@derekc00
derekc00 / view.swift
Created August 27, 2020 01:42
SwiftUI - HStack, center one view and right justify another
var body: some View {
HStack{
Text("New Game")
.layoutPriority(1)
.foregroundColor(Color.blue)
Spacer().frame(height: 5).background(Color.blue)
Text("Title")
@derekc00
derekc00 / ViewController.swift
Last active January 11, 2021 13:22
Dynamic Navigation Bar
//
// ViewController.swift
// Dynamic Header Example
//
// Created by Derek Chang on 8/5/20.
// Copyright © 2020 Derek Chang. All rights reserved.
//
import UIKit
//
// ViewController.swift
// LottiePracticev2
//
// Created by Derek Chang on 3/4/20.
// Copyright © 2020 Derek Chang. All rights reserved.
//
import UIKit
import Lottie