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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>ApplicationIdentifier</key> | |
<string>com.naiveapps.juxtacode</string> | |
<key>ApplicationName</key> | |
<string>JuxtaCode</string> |
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
#!/bin/sh | |
# CHECK IF JUXTA IS INSTALLED AS A COMMAND LINE TOOL # | |
# Set CMD to where the juxta is in the PATH of the environment. | |
CMD=`which juxta` | |
# If that didn't produce any results we search for juxta at the default path. | |
if [ -z "$CMD" ] ; then | |
if [ -e '/usr/local/bin/juxta' ] ; then |
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
/* Remove Outline around selected items in the advanced search options */ | |
.filter-item ._0_selected { | |
outline: 0px; | |
outline-offset: 0px; | |
} | |
/* Increase bottom below search result URLs */ | |
.__sri-url-box { | |
padding-bottom: 4px; | |
} |
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
# File options | |
--exclude Pods | |
# Rules | |
## Enabled | |
--enable andOperator | |
--enable anyObjectProtocol | |
--enable assertionFailures |
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
// | |
// ContentView.swift | |
// Component Designer | |
// | |
// Created by Benno on 15.03.22. | |
// | |
import SwiftUI | |
struct ContentView: View { |
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 | |
extension PreviewDevice: Identifiable { | |
public var id: String { rawValue } // Support for each loops over an array of Preview Devices | |
static var iPhoneSE1: PreviewDevice { .init(.iPhoneSE1) } | |
static var iPhone7: PreviewDevice { .init(.iPhone7) } | |
static var iPhone7Plus: PreviewDevice { .init(.iPhone7Plus) } | |
static var iPhone8: PreviewDevice { .init(.iPhone8) } |
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 Foundation | |
extension Array { | |
func shifted(by shiftAmount: Int) -> Array<Element> { | |
// 1 | |
guard self.count > 0, (shiftAmount % self.count) != 0 else { return self } | |
// 2 |
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 UIKit | |
extension UIFont { | |
/// Prints all fonts that can be used with `UIFont(name:, size:)` to the console. | |
static func printAllAvailableFontNames() { | |
for familyName in UIFont.familyNames { | |
print("\n\(familyName)") | |
for fontName in UIFont.fontNames(forFamilyName: familyName) { | |
print("\t- \(fontName)") |
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
extension Equatable { | |
// Usage: 3.isAny(of: 0, 1, 2, 3) // true | |
func isAny(of candidates: Self...) -> Bool { | |
return candidates.contains(self) | |
} | |
} | |
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
extension Array { | |
// Usage: [1,2,3,4].shifted(by: 2) --> [3,4,1,2] or "hello".shifted(by: -1) --> "elloh" | |
func shifted(by shiftAmount: Int) -> Array { | |
guard self.count > 0, (shiftAmount % self.count) != 0 else { return self } | |
let moduloShiftAmount = shiftAmount % self.count | |
let effectiveShiftAmount = moduloShiftAmount < 0 ? moduloShiftAmount + self.count : moduloShiftAmount | |
let shift: (Int) -> Int = { return $0 + effectiveShiftAmount >= self.count ? $0 + effectiveShiftAmount - self.count : $0 + effectiveShiftAmount } | |
return self.enumerated().sorted(by: { shift($0.offset) < shift($1.offset) }).map { $0.element } | |
} |
NewerOlder