Skip to content

Instantly share code, notes, and snippets.

import SwiftUI
enum FontStyle: String, CaseIterable {
case titleExtraLarge
case titleMiddle
case body
case bodyBold
case description
case descriptionBold
}
import SwiftUI
struct FontStyleSampleView: View {
private var fontStyles = FontStyle.allCases
var body: some View {
List(fontStyles, id: \.self) { style in
Text(style.rawValue)
.fontStyle(style)
.foregroundColor(.black)
import UIKit
struct MenuViewData {
let title: String
let actionViewDataList: [ActionViewData]
init?(_ actionViewDataList: [ActionViewData], title: String = "") {
guard !actionViewDataList.isEmpty else { return nil }
self.actionViewDataList = actionViewDataList
module Fastlane
module Actions
class IsMergeCommitLatestAction < Action
def self.run(params)
last_commit_hash = Action.sh("git log -1 --pretty=format:\"%H\"")
last_merge_commit_hash = Action.sh("git log -1 --merges --pretty=format:\"%H\"")
UI.message "Determine if the latest commit is merge commit."
return false if last_commit_hash != last_merge_commit_hash
module Fastlane
module Actions
class GetMilestoneAction < Action
def self.run(params)
UI.message("Getting milestone on GitHub (#{params[:server_url]}/#{params[:url]} | Title: #{params[:title]}, state:#{params[:state]})")
GithubApiAction.run(
server_url: params[:server_url],
api_token: params[:api_token],
http_method: "GET",
module Fastlane
module Actions
class GetIssuesWithMilestoneAction < Action
def self.run(params)
UI.message("Getting issues on GitHub (#{params[:server_url]}/#{params[:url]} | with milestone: \##{params[:milestone_number]}, state:#{params[:state]})")
GithubApiAction.run(
server_url: params[:server_url],
api_token: params[:api_token],
http_method: "GET",
import LocalAuthentication
class BiometricAuthenticationManager {
enum BiometricAuthenticationType {
case faceID(permitted: Bool)
case touchID
case none
}