A Pen by Matt Daniel Brown on CodePen.
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
{ | |
"commands": [ | |
{ | |
"Work": [ | |
{ | |
"cmd": "ping www.bing.com", | |
"name": "Ping Bing" | |
}, | |
{ | |
"cmd": "ps aux", |
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
// Remember: import UserNotifications | |
func sendNotification(title: String, body: String = "") { | |
let content = UNMutableNotificationContent() | |
content.title = title | |
if body.count > 0 { | |
content.body = body | |
} | |
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 Cocoa | |
struct ScreenRecordPermission { | |
static var hasPermission: Bool { | |
permissionCheck() | |
} | |
static func permissionCheck() -> Bool { | |
if #available(macOS 10.15, *) { | |
let runningApplication = NSRunningApplication.current |
Some might be outdated.
Taken from (404 as of today): https://macosxautomation.com/system-prefs-links.html
$ open "x-apple.systempreferences:com.apple.preference.security?General"
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 SwiftPrettyPrint | |
/* | |
* SwiftPrettyPrint | |
* https://github.com/YusukeHosonuma/SwiftPrettyPrint | |
*/ | |
class ViewController: UIViewController { |
echo "# fhefh2015.github.io" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin [email protected]:fhefh2015/fhefh2015.github.io.git
git push -u origin main
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
// | |
// Utils.swift | |
// SwiftUIAppleDemo | |
// | |
// Created by Apple on 2021/8/30. | |
// | |
import Foundation | |
import SwiftUI |
NewerOlder