Skip to content

Instantly share code, notes, and snippets.

View richy486's full-sized avatar
🐢
Experimenting

Richard Adem richy486

🐢
Experimenting
View GitHub Profile
@richy486
richy486 / DefaultKeyBinding.dict
Last active March 26, 2025 08:04
VSCode settings
{
"^@\UF701" = "noop:";
"^@\UF702" = "noop:";
"^@\UF703" = "noop:";
}
// https://kevinyank.com/posts/fix-system-beep-vscode/
@richy486
richy486 / xcClean.sh
Last active November 22, 2019 18:28
Xcode clean up
#!/bin/bash
# Clean Xcode files
# @richy486 https://gist.github.com/richy486
# http://ajithrnayak.com/post/95441624221/xcode-users-can-free-up-space-on-your-mac
STATUS='\033[0;36m'
WARNING='\033[0;33m'
ERROR='\033[0;31m'
CMD='\033[0;92m'
NC='\033[0m' # No Color
@richy486
richy486 / statusEmoji.txt
Last active December 21, 2017 22:23
πŸ”¨πŸ€– Status Emoji, For team updates
Design
🎨 Sketch files
🌊 UI Flow
πŸ– Colors
😎 Style guide
πŸ–Ό Images
Code
🐦 Swift
πŸ”¨Β Xcode
@richy486
richy486 / absoluteTrivialStateDerivative.swift
Created June 15, 2018 15:05
Absolute Trivial State Derivative
enum Action: Int {
case buttonDown
}
struct State {
var counter: Int = 0
}
struct View {
var height: Float
// Is this a good shorthand instead of using a switch?
enum State {
case running
case jumping
}
var currentState: State = .running
let stateView = currentState.transform {[
@richy486
richy486 / SwiftOptionSet.md
Last active December 2, 2018 02:56
Swift OptionSet binary operations
@richy486
richy486 / new_mac.md
Last active November 18, 2024 13:17
New Mac

New Mac

Finder

Show file extensions

Finder > Settings, then click Advanced. Select or deselect "Show all filename extensions"

Hidden files

toggle:

@richy486
richy486 / IdentityTest.swift
Created January 18, 2022 21:33
Animate between container views with `matchedGeometryEffect`
import SwiftUI
import PlaygroundSupport
// https://www.hackingwithswift.com/quick-start/swiftui/how-to-synchronize-animations-from-one-view-to-another-with-matchedgeometryeffect
struct AdaptiveStack<Content: View>: View {
var content: () -> Content
@Binding var vertical: Bool
init(vertical: Binding<Bool>, @ViewBuilder content: @escaping () -> Content) {
_vertical = vertical