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
#!/bin/sh | |
set -e | |
if ! test -x "`which ldid`"; then | |
echo "Cannot find ldid, you may install it via Homebrew." | |
exit 1 | |
fi | |
if [ ! -d "$(xcode-select -p)" ]; then |
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 <Foundation/Foundation.h> | |
#import <os/log.h> | |
#define FAKE_BASE 0x100000000 | |
#define FAKE_PAGE 4096 | |
template <unsigned B> inline int64_t SignExtend64(uint64_t x) { | |
static_assert(B > 0, "Bit width can't be 0."); | |
static_assert(B <= 64, "Bit width out of range."); | |
return int64_t(x << (64 - B)) >> (64 - B); |
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
// | |
// This source file is part of the Swift.org open source project | |
// | |
// Copyright (c) 2014 - 2016, 2018 Apple Inc. and the Swift project authors | |
// Licensed under Apache License v2.0 with Runtime Library Exception | |
// | |
// See http://swift.org/LICENSE.txt for license information | |
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors | |
// | |
// Original version: |
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
nLog("Open “Notes”…") | |
app.run("com.apple.mobilenotes") | |
local x, y | |
while x == nil do | |
nLog("Find “New Note” button…") | |
sys.sleep(1) | |
x, y = screen.find_color({ | |
{1056,2341,0xe4af0a}, | |
{1057,2388,0xe4af0a}, |
OlderNewer