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 |
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 { |
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 Cocoa | |
struct ScreenRecordPermission { | |
static var hasPermission: Bool { | |
permissionCheck() | |
} | |
static func permissionCheck() -> Bool { | |
if #available(macOS 10.15, *) { | |
let runningApplication = NSRunningApplication.current |
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
{ | |
"commands": [ | |
{ | |
"Work": [ | |
{ | |
"cmd": "ping www.bing.com", | |
"name": "Ping Bing" | |
}, | |
{ | |
"cmd": "ps aux", |
A Pen by Matt Daniel Brown on CodePen.
// here are the five different ways to set up a fetch request so you’re not caught by surprise:
// 1
let fetchRequest1 = NSFetchRequest<Venue>()
let entity =
NSEntityDescription.entity(forEntityName: "Venue",
in: managedContext)!
fetchRequest1.entity = entity
// 2
Building a website nowadays is not as hard or expensive as it was in the past. These days, you do not have to learn a crazy programming language to have your site up and running.
# First install rbenv
brew install rbenv
# Second install ruby 2.7
# Why, detaill see: https://talk.jekyllrb.com/t/error-no-implicit-conversion-of-hash-into-integer/5890
OlderNewer