Skip to content

Instantly share code, notes, and snippets.

View Lessica's full-sized avatar

i_82 Lessica

View GitHub Profile
@Lessica
Lessica / fetch-libimobiledevice.sh
Created May 13, 2023 15:11
Fetch libraries and executables for macOS from libimobiledevice artifacts. This script will make executables runnable without install them to specific paths.
#!/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
@Lessica
Lessica / patch-to-securityd-tweak.mm
Last active February 28, 2024 11:28
A patch to securityd
#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);
@Lessica
Lessica / TaskProcess+ObjC.swift
Last active September 27, 2024 00:01
Customized posix_spawn/NSTask/Process implementation in Swift/ObjC with a single file.
//
// 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:
@Lessica
Lessica / my-awesome-script.lua
Created April 9, 2025 13:36
My Awesome Script for XXTouch Elite
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},