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
| # Use Google Cloud Platform stackdriver with python structlog | |
| from google.cloud.logging import Client | |
| from google.cloud.logging import _helpers | |
| from google.cloud.logging.handlers import CloudLoggingHandler | |
| from google.cloud.logging.handlers.transports.background_thread import _Worker | |
| # pip install python-json-logger | |
| from pythonjsonlogger import jsonlogger |
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 | |
| // Export running app as .ipa, then return path to exported file. | |
| // Returns String because app crashes when returning URL from async function for some reason... | |
| func exportIPA() async throws -> String | |
| { | |
| // Path to app bundle | |
| let bundleURL = Bundle.main.bundleURL | |
| // Create Payload/ directory |
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
| from playwright.sync_api import sync_playwright | |
| def save_mhtml(path: str, text: str): | |
| with open(path, mode='w', encoding='UTF-8', newline='\n') as file: | |
| file.write(text) | |
| def save_page(url: str, path: str): | |
| with sync_playwright() as playwright: | |
| browser = playwright.chromium.launch(headless=False) |
OlderNewer