⌘ – ⌘
– ⌘
– the Command Key symbol
⌥ – ⌥
– ⌥
– the Option Key symbol
⇧ – ⇧
– ⇧
– the Shift Key symbol
⌃ – ⌃
– ⌃
– the Control Key symbol
⎋ – ⎋
– ⎋
– the ESC Key symbol
⇪ – ⇪
– ⇪
– the Capslock symbol
⏎ – ⏎
– ⏎
– the Return symbol
⌫ – ⌫
– ⌫
– the Delete / Backspace symbol
⇥ – ⇥
– ⇥
– the Tab Key symbol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
activate application "SF Symbols" | |
tell application "System Events" | |
tell process "SF Symbols" | |
-- Click the “list” radio button. | |
click radio button 2 of radio group 1 of group 3 of toolbar 1 of window 0 | |
tell outline 1 of scroll area 1 of splitter group 1 of window 0 | |
select (row 1 where value of static text 1 of UI element 1 starts with "All") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FloatingPanel: NSPanel { | |
init(contentRect: NSRect, backing: NSWindow.BackingStoreType, defer flag: Bool) { | |
// Not sure if .titled does affect anything here. Kept it because I think it might help with accessibility but I did not test that. | |
super.init(contentRect: contentRect, styleMask: [.nonactivatingPanel, .resizable, .closable, .fullSizeContentView], backing: backing, defer: flag) | |
// Set this if you want the panel to remember its size/position | |
// self.setFrameAutosaveName("a unique name") | |
// Allow the pannel to be on top of almost all other windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
func extractViewsFromContent<Content: View> (@ViewBuilder content: () -> Content) -> [Any] { | |
let tupleView = content() | |
let tupleViewMirror = Mirror(reflecting: tupleView) | |
let tuple = tupleViewMirror.children.first!.value | |
let tupleMirror = Mirror(reflecting: tuple) | |
let views = tupleMirror.children.map { $0.value } | |
return views | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SwiftUI Custom Styles (TripleToggleStyle) | |
// https://swiftui-lab.com | |
// https://swiftui-lab.com/custom-styling | |
import SwiftUI | |
// MARK: - TripleToggle View | |
public struct TripleToggle: View { | |
@Environment(\.tripleToggleStyle) var style: AnyTripleToggleStyle | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIColor.swift | |
// previously Color+HexAndCSSColorNames.swift | |
// | |
// Created by Norman Basham on 12/8/15. | |
// Copyright ©2018 Black Labs. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen | |
{% if files %} | |
{% set accessModifier %}{% if param.publicAccess %}public{% else %}internal{% endif %}{% endset %} | |
{% set documentPrefix %}{{param.documentName|default:"Document"}}{% endset %} | |
import Lottie | |
import UIKit | |
// swiftlint:disable superfluous_disable_command | |
// swiftlint:disable file_length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Select objects in array whose key includes a value | |
* | |
* @param {Array} arr Array to test | |
* @param {String} key Key to inspect | |
* @param {String} value Value key needs to include | |
* @return {String} Filtered array | |
* | |
*/ | |
module.exports = function (arr, key, value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Select objects in array whose key matches a value | |
* | |
* @param {Array} arr Array to test | |
* @param {String} key Key to inspect | |
* @param {String} value Value key needs to match | |
* @return {String} Filtered array | |
* | |
*/ | |
module.exports = function (arr, key, value) { |
All code is available in example app - https://github.com/maxivak/webpacker-rails-example-app
NewerOlder