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/bash | |
| # This assumes that the ~6GB mojave installer is in the /Applications folder. | |
| # If it's not, just open the App Store, search Mojave, and you can download the installer file from there. | |
| hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave | |
| sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave | |
| mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg | |
| hdiutil detach /Volumes/Install\ macOS\ mojave |
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 <Foundation/Foundation.h> | |
| #import <Cocoa/Cocoa.h> | |
| int main(int argc, const char * argv[]) | |
| { | |
| @autoreleasepool { | |
| // Grab the current mouse location. | |
| CGPoint mouseLoc = CGEventGetLocation(CGEventCreate(NULL)); |
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
| protocol ScopeFunc {} | |
| extension ScopeFunc { | |
| @inline(__always) func apply(block: (Self) -> ()) -> Self { | |
| block(self) | |
| return self | |
| } | |
| @inline(__always) func letIt<R>(block: (Self) -> R) -> R { | |
| return block(self) | |
| } | |
| } |
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
| public class Wait { | |
| private static final int CHECK_INTERVAL = 100; | |
| private static final int TIMEOUT = 10000; | |
| public interface Condition { | |
| boolean check(); | |
| } | |
| private Condition mCondition; |