Skip to content

Instantly share code, notes, and snippets.

@mrbodich
mrbodich / .swift
Last active August 1, 2023 10:08
Chain of Responsibility + Decorator + Single Responsibility — ATM
//MARK: - Withdrawing.swift
import Foundation
protocol Withdrawing {
func capacity(amount: Int) -> Int
}
extension Withdrawing {
func chained(withNext next: Withdrawing) -> Withdrawing {
WithdrawingDecorator(main: self, relief: next)
@mrbodich
mrbodich / openapi.yaml
Created June 10, 2023 10:50 — forked from xgp/openapi.yaml
OpenAPI specification for Keycloak account API
openapi: 3.0.2
info:
title: Keycloak Account API
version: 20.0.3
description: |
Derived from the code at https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/services/resources/account/AccountRestService.java
components:
securitySchemes:
access_token:
type: http
@mrbodich
mrbodich / .env
Created May 14, 2023 13:00 — forked from degitgitagitya/.env
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
@mrbodich
mrbodich / background-brake-button.swift
Created January 24, 2022 08:47
Background with gesture brakes Button tap
struct ButtonTest: View {
var body: some View {
ScrollView {
VStack {
Button(action: {}) {
Text("Tap me...")
.frame(height: 30)
.padding(.horizontal, 50)
.foregroundColor(.white)
.lineLimit(1)