- Used on macOS for managing agents and daemons and can be used to run scripts at specified intervals
- macOS's competitor to
cron, along with other things
- macOS's competitor to
- Runs Daemons and Agents
| const timer = ms => new Promise(res => setTimeout(res, ms)); | |
| // Unretweet normally | |
| const unretweetTweet = async (tweet) => { | |
| await tweet.querySelector('[data-testid="unretweet"]').click(); | |
| await timer(250); | |
| await document.querySelector('[data-testid="unretweetConfirm"]').click(); | |
| console.log('****// Unretweeted Successfully //****') | |
| } |
| #!/bin/bash | |
| # print an anchor subset (r, n or A) | |
| function pfprint() { | |
| # avoid trusting PATH and . | |
| /usr/bin/sudo pfctl -a "$2" -s"$1" 2>/dev/null | |
| } |
| // Run any SwiftUI view as a Mac app. | |
| import Cocoa | |
| import SwiftUI | |
| NSApplication.shared.run { | |
| VStack { | |
| Text("Hello, World") | |
| .padding() | |
| .background(Capsule().fill(Color.blue)) |
| import SwiftSyntax | |
| import SwiftSemantics | |
| import Foundation | |
| let source = try! String(contentsOf: URL(fileURLWithPath: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/arm64e.swiftinterface")) | |
| var collector = DeclarationCollector() | |
| let tree = try SyntaxParser.parse(source: source) | |
| tree.walk(&collector) |
| // swift-interface-format-version: 1.0 | |
| // swift-compiler-version: Apple Swift version 5.1.1 (swiftlang-1100.2.274.2 clang-1100.2.32.1) | |
| // swift-module-flags: -target arm64e-apple-ios13.2 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name SwiftUI | |
| import Combine | |
| import CoreData | |
| import CoreFoundation | |
| import CoreGraphics | |
| import CoreText | |
| import Darwin | |
| import Foundation |
| /* | |
| Unfollow (stop following) those people who are not following you back on Twitter (or unfollow everyone if desired). | |
| This will work for new Twitter web site code structure (it was changed from July 2019, causing other unfollow-scripts to stop working). | |
| Instructions: | |
| 1) The code may need to be modified depending on the language of your Twitter web site: | |
| * For English language web site, no modification needed. | |
| * For Spanish language web site, remember to set the 'LANGUAGE' variable to "ES". | |
| * For another language, remember to set the 'LANGUAGE' variable to that language and modify the 'WORDS' object to add the words in that language. |
This document provides help on getting your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, etc.
Homebrew is an excellent package manager for macOS; let's install it.
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Proposal: SE-XXXX
- Authors: Chris Lattner, Joe Groff
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
Credit to answer found here http://stackoverflow.com/questions/21095054/ssh-key-still-asking-for-password-and-passphrase
This will ask you for the passphrase, enter it and it won't ask again.
ssh-add ~/.ssh/id_rsa &>/dev/null