This file contains hidden or 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
| local countOfWindows | |
| local countOfTabs | |
| tell application "Safari" | |
| set countOfWindows to count of windows | |
| set countOfTabs to 0 | |
| repeat with n from 1 to countOfWindows | |
| set countOfTabs to countOfTabs + (count of tabs in window n) | |
| end repeat |
This file contains hidden or 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 | |
| print( NSImageRep.registeredClasses ) // -> [NSPDFImageRep, NSPICTImageRep, NSEPSImageRep, NSBitmapImageRep] | |
| func test() { | |
| guard let rep = NSBitmapImageRep(bitmapDataPlanes: nil, | |
| pixelsWide: 256, | |
| pixelsHigh: 256, | |
| bitsPerSample: 8, | |
| samplesPerPixel: 4, |
This file contains hidden or 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 XCTest | |
| import Cocoa | |
| import Combine | |
| final public class MappedCurrentValueSubject<A, B, Failure, S: CurrentValueSubject<A, Failure>> : Subject | |
| where Failure == S.Failure | |
| { | |
| public typealias Output = B | |
This file contains hidden or 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
| // For Pete | |
| // v3.0.2 | |
| // by @GeekAndDad | |
| // Define the outer circle radius and desired inner circle radius | |
| outer_circle_radius = 100; | |
| desired_inner_radius = 20; | |
| // Call our function to calulate the centers of the three evenly spaced circles | |
| // and |
This file contains hidden or 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 | |
| SRC1=$HOME/Library/Safari | |
| SRC2=$HOME/Library/Containers/com.apple.Safari/Data/Library/Safari | |
| HOST=$( hostname | sed 's/\..*//' ) | |
| HOUR=$( date +"%H" ) | |
| DST=$HOME/Sync/Safari/$HOST/$HOUR | |
| mkdir -p $DST 2>/dev/null | |
| cd $SRC1 |
This file contains hidden or 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
| defaults write com.apple.iWork.Pages TSADisableUpdateNotifications -bool yes | |
| defaults write com.apple.iWork.Keynote TSADisableUpdateNotifications -bool yes | |
| defaults write com.apple.iWork.Numbers TSADisableUpdateNotifications -bool yes |
OlderNewer