Skip to content

Instantly share code, notes, and snippets.

View boska's full-sized avatar
🎯
Focusing

Yang Lee boska

🎯
Focusing
View GitHub Profile
let isLoading: Driver<Bool>
isLoading.drive(weatherIconView.rx.isHidden).disposed(by: bag)
isLoading.drive(pressureLabel.rx.isHidden).disposed(by: bag)
isLoading.drive(precipitationLabel.rx.isHidden).disposed(by: bag)
isLoading.drive(windSpeedLabel.rx.isHidden).disposed(by: bag)
isLoading.drive(windDirectionLabel.rx.isHidden).disposed(by: bag)
isLoading.drive(humidityLabel.rx.isHidden).disposed(by: bag)
@boska
boska / FriendlyId.swift
Created May 20, 2019 05:51
FriendlyId.swift
extension String {
static func friendlyId(length: Int = 22) -> String {
let alphabets = Array("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
var friendlyId = ""
for _ in 1...length {
friendlyId.append(alphabets[Int.random(in: 0...alphabets.count - 1)])
}
return friendlyId
}
}
/* Example
ZStack(alignment: .top) {
ForEach(cardModels, id: \.id) { model in
CardView(model)
.swipeable { swipedRight in
// store.swipe(swipedRight)
}
}
}
*/
@boska
boska / AnyForm.swift
Last active January 22, 2025 22:06
Form in Swift
struct FormRendererView_Previews: PreviewProvider {
static var previews: some View {
FormRendererView_Previews.feedbackExample
}
static var feedbackExample: some View {
FormRendererView(
submitButtonTitle: "Send Feedback",
formFields: [
FormFieldConfiguration(
@boska
boska / FridaDetection.swift
Created April 30, 2026 15:04
Mobile App Hooking: Attack & Defense — Frida hook examples + iOS detection (companion to LinkedIn post)
// FridaDetection.swift
// Basic Frida detection for iOS — simplified examples
//
// Further reading:
// - Frida: https://frida.re
// - OWASP Mobile Top 10: https://owasp.org/www-project-mobile-top-10/
// - iOS Security Guide: https://support.apple.com/guide/security/welcome/web
// - Objection (Frida-based pentest tool): https://github.com/sensepost/objection
import Foundation