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
#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
#!/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 <dlfcn.h> | |
#import <os/log.h> | |
#import <substrate.h> | |
#import <Foundation/Foundation.h> | |
#import "pac_helper.h" | |
#define _FUNC_ADDR_(A, O) (const void *)((long)(A) + (O)) | |
/* ... */ |
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 <dlfcn.h> | |
#import <sys/proc.h> | |
// these headers can be found at https://github.com/apple/darwin-xnu | |
#import "libproc.h" | |
#import "kern_memorystatus.h" | |
static __attribute__ ((constructor(101), visibility("hidden"))) | |
void BypassJetsam(void) { |
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
diff --git a/src/fdr.c b/src/fdr.c | |
index ee76de6..c092b0b 100644 | |
--- a/src/fdr.c | |
+++ b/src/fdr.c | |
@@ -549,7 +549,7 @@ static int fdr_handle_proxy_cmd(fdr_client_t fdr) | |
} | |
/* else wait for messages and forward them */ | |
- int sockfd = socket_connect(host, port); | |
+ int sockfd = idevicerestore_socket_connect(host, port); |
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
#!/system/bin/sh | |
sleeptime=120 | |
while true | |
do | |
cputemp=$(cat /sys/class/thermal/thermal_zone0/temp) | |
if [[ $cputemp -lt 55000 ]]; then | |
fanspeed="0x00" | |
elif [ $cputemp -ge 55000 -a $cputemp -lt 60000 ]; then | |
fanspeed="0x10" |
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
#!/usr/bin/env python3 | |
# | |
# Copyright (C) 2014-2020 Apple Inc. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
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/zsh | |
repeatBy() { for i in {1..$(expr $1)}; do echo -n "$2"; done } | |
if [ "$#" -lt 2 ]; then | |
echo "usage: $0 v h [command]" | |
exit 1 | |
fi | |
CMD="$3" |
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
def expects_json(obj: dict, schema: tuple): | |
# or use library `flask-expects-json` | |
_type = type(obj) | |
if _type != dict: | |
raise werkzeug.exceptions.BadRequest(f"wrong type of root object, except dict, got {str(_type.__name__)}") | |
_keys = schema | |
for _key in _keys: | |
assert len(_key) >= 2 | |
if _key[0] not in obj: | |
if len(_key) >= 3 and _key[2] is False: |
NewerOlder