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
//: Playground - noun: a place where people can play | |
import Foundation | |
import XCTest | |
let fullname = "John Doe" | |
let age = 42 | |
let me = 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
let list = raw.components(separatedBy: "\n") | |
let limit = list.count/2 | |
var formatted = "" | |
for (index, item) in list.enumerated() { | |
guard index < limit else { continue } | |
formatted.append(item) | |
formatted.append("\t") | |
formatted.append(list[index + limit]) | |
formatted.append("\n") | |
} |
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 | |
pushd /Applications/Microsoft\ Defender.app/Contents/MacOS/ | |
sudo chmod -x * | |
pushd /Library/Managed\ Preferences/ | |
# TODO: update to new location | |
sudo su root -c "plutil -replace antivirusEngine.passiveMode -bool true com.microsoft.wdav.plist" | |
sudo su root -c "plutil -replace antivirusEngine.enableRealTimeProtection -bool false com.microsoft.wdav.plist" |
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 | |
import RealmSwift | |
final class Task: Object { | |
@Persisted var id: String = "" | |
@Persisted var title: String = "" | |
@Persisted var text: String = "" | |
override static func primaryKey() -> String? { "id" } | |
} |
OlderNewer