Skip to content

Instantly share code, notes, and snippets.

View mferak's full-sized avatar

Michal Ferak mferak

View GitHub Profile
@DabbyNdubisi
DabbyNdubisi / NavigationAllowedDismissalGesturesModifier.swift
Last active December 8, 2025 09:51
Control Interactive Dismissal of Navigation Zoom Transition SwiftUI
import SwiftUI
import UIKit
import Foundation
// MARK: - AllowedNavigationDismissalGestures
public struct AllowedNavigationDismissalGestures: OptionSet, Sendable {
public let rawValue: Int
public init(rawValue: Int) {
@stefanvangastel
stefanvangastel / appDirectives.js
Created March 17, 2015 09:50
CakePHP 3 form validation message by AngularJS directive
var appDirectives = angular.module('appDirectives', []);
/**
* Add potential validation fields to form-control form elements (CakePHP 3 with Bootstrap)
*
* Requirement: $scope.errors contains option (validation) errors in default CakePHP 3 JSON response
*/
appDirectives.directive('formControl', function($compile) {
return {
restrict: 'C', //Match all elements with form-control class