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/bash | |
# Script Name: Script Name: wpdebug.sh | |
# Description: A script for enabling or disabling WordPress debugging mode in the wp-config.php file. | |
# Author: Roy McKenzie | |
# Date: April 23, 2024 | |
# Version: 1.0 | |
# | |
# Usage: ./wpdebug.sh [install|uninstall|enable|disable|tail|delete] | |
# | |
# Options: |
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 m from 'mithril'; | |
import trashIcon from '../../../public/trash.svg?raw'; | |
import bars3 from '../../../public/bars-3.svg?raw'; | |
import bars4 from '../../../public/bars-4.svg?raw'; | |
const IconMap = { | |
trash: trashIcon, | |
'bars-3': bars3, | |
'bars-4': bars4 | |
}; |
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
{ | |
"+1": "👍", | |
"-1": "👎", | |
"100": "💯", | |
"1234": "🔢", | |
"8ball": "🎱", | |
"ab": "🆎", | |
"abc": "🔤", | |
"abcd": "🔡", | |
"accept": "🉑", |
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 | |
import UserNotifications | |
import PropellerPromise | |
struct NotificationPermissionController { | |
static var permissionsEnabled: Bool { | |
guard let settings = UIApplication.shared.currentUserNotificationSettings else { | |
return false | |
} |
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
protocol CloudKitSyncable { | |
var id: String { get } | |
var recordID: CKRecordID { get } | |
var synced: Date? { get } | |
var modified: Date { get } | |
var deleted: Date? { get } | |
var record: CKRecord { get } | |
var recordChangeTag: String? { get } | |
var recordOwnerName: String? { get } | |
} |
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 | |
import UserNotifications | |
import CloudKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { | |
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
final class DataDisplayViewController: UIViewController { | |
private var realmNotificationToken: NotificationToken? | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
startRealmNotification() | |
} | |
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 | |
import CloudKit | |
import RealmSwift | |
/// Handles common methods for subscriptions across multiple databases | |
enum CloudKitDatabaseSubscription: String { | |
case `private` | |
case `public` | |
} |
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 CloudKit | |
// Create subscription with an internal identifier | |
let subscription = CKDatabaseSubscription(subscriptionID: "internalSubscriptionIdentifier") | |
// Create an operation to save the subscription | |
let operation = CKModifySubscriptionsOperation(subscriptionsToSave: [subscription], | |
subscriptionIDsToDelete: nil) | |
// Add the operation to the private database | |
CKContainer.default() |
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
platform :ios do | |
lane :beta do | |
# ... | |
increment_build_number(xcodeproj: "ProjectName.xcodeproj", | |
build_number: date_based_build_number) | |
end | |
# Generate todays date formatted for version | |
def today_formatted | |
Date.today.strftime('%Y%m%d') |
NewerOlder