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
# removefrom quarantine: | |
# sudo xattr -rd com.apple.quarantine "/Users/home/Programming/Python/projects/ToolBoxPy/src/linux/connectPhone.command" | |
# This small script meant to save Apple users the hassle of resetting/disconnecting and connecting an Apple device, again and again, until a steady connection. | |
# Just connect your device and run this command, it will reconnect the device until a steady connection | |
# set here the sensitivity of the checks. I fount it best to use these props | |
MAX_PASSED_CHECKS=50 | |
TIMEOUT_BETWEEN_CHECKS=0.3 # in secs | |
TIMEOUT_AFTER_EACH_USB_RESET=4 # in secs |
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
class HttpResParser { | |
companion object { | |
fun parseRawHttpStringRes(httpRes: ByteArray): HttpRes { | |
val br = ByteArrayInputStream(httpRes).bufferedReader() | |
val version: String | |
val statusCode: String | |
val reason: String |
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 bash | |
APK_VERSION_NUMBER=2 | |
APPS_ROOT_PATH="/Users/home/Desktop/stock_exchange/latest_work/appr_14_" | |
# Will initiate the adb cycle | |
start_adb_ss_cycle () { | |
# create ss dir | |
ss_dir="$1/ss" |
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 clear_old_launcher_files(self): | |
import os_tools.FileHandler as fh | |
launcher_made_files = fh.search_files(PROJECT_MAIN_PATH, None, 'ic_launcher') | |
fh.remove_files(launcher_made_files) |
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
from os_tools import FileHandler as fh | |
COLORS_MAIN_DIR = '/Users/home/Desktop/work/Apps/untitled folder/main_dir_fixed_colors' | |
COLORS_TO_INJECT_MAIN_DIR = '/Users/home/Desktop/work/Apps/untitled folder/no_good_color_apps' | |
# fetch all of the color xml files from the colors main dir | |
color_xmls = fh.search_files(COLORS_MAIN_DIR, 'dynamic_colors.xml') | |
# fetch all of the dirs to run on |
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 | |
extension UnsafeBufferPointer where Element == UInt8 { | |
/// Will read 4 bytes from a buffer to a single (little endian) int | |
func readUInt32LE(offset: Int) -> UInt32 { | |
var arr: UnsafeBufferPointer<UInt8>? = UnsafeBufferPointer<UInt8>.init(rebasing: self[offset...offset + 4]) | |
let uint32Val = arr!.baseAddress!.withMemoryRebound(to: UInt32.self, capacity: 1) { $0 }.pointee | |
arr = nil |