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"
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"
/** | |
* Retrieve object from Chrome's Local StorageArea | |
* @param {string} key | |
*/ | |
const getObjectFromLocalStorage = async function(key) { | |
return new Promise((resolve, reject) => { | |
try { | |
chrome.storage.local.get(key, function(value) { | |
resolve(value[key]); | |
}); |
import AppKit | |
import SwiftUI | |
// Delete this line if not using a playground | |
import PlaygroundSupport | |
struct ContentView: View { | |
var body: some View { | |
// if spacing is not set to zero, there will be a gap after the first row |
source $HOME/.zplug/init.zsh | |
# Make sure you use double quotes | |
zplug "zsh-users/zsh-history-substring-search" | |
zplug "zsh-users/zsh-syntax-highlighting" | |
# zplug "lib/theme-and-appearance", from:oh-my-zsh | |
# Node Plugins | |
zplug "lukechilds/zsh-nvm", as:plugin, use:"zsh/*.zsh" |
import SwiftUI | |
import WebKit | |
struct ContentView: View { | |
var body: some View { | |
Webview(url: URL(string: "https://google.com")!) | |
} | |
} | |
struct Webview: UIViewRepresentable { |
# link: https://sujingjhong.com/posts/how-to-deploy-hugo-automatically-with-github-actions/ | |
# author: lisez <mm4324@gmail.com> | |
name: Auto publish to public site | |
# 只有推送到 master 才自動化 | |
on: | |
push: | |
branches: | |
- master |
// | |
// SnapshotDiffableDataSource.swift | |
// testDiffableDataSource | |
// | |
// Created by Miguel Alcântara on 22/01/2020. | |
// Copyright © 2020 Miguel Alcântara. All rights reserved. | |
// | |
import UIKit |
// From https://stackoverflow.com/a/58985069/118631 | |
@available(macOS 10.15, *) | |
func canRecordScreen() -> Bool { | |
let runningApplication = NSRunningApplication.current | |
let processIdentifier = runningApplication.processIdentifier | |
guard let windows = CGWindowListCopyWindowInfo([.optionOnScreenOnly], kCGNullWindowID) | |
as? [[String: AnyObject]] else | |
{ |
/** | |
* MacEditorTextView | |
* Copyright (c) Thiago Holanda 2020-2021 | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
*/ | |
import Combine | |
import SwiftUI |
// | |
// | |
// NTSolar.swift | |
// | |
// Created by Neil Tiffin on 5/8/19. | |
// Copyright © 2019 Performance Champions, Inc. | |
// Copyright © 2019 Neil Tiffin. | |
// | |
// Released to the public domain by Neil Tiffin, May 2019 | |
// Released to the public domain by Performance Champions, Inc., May 2019 |