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
for any thing that isn't code, Please respond as if writing a git commit messages. If a response must be longer then 4 sentences, please break it to into separate commits. |
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
# Define a directory for log files | |
$logDir = "$env:USERPROFILE\logs\" | |
$maxEvents = 500 # Number of most recent events to retrieve | |
if (-not (Test-Path $logDir)) { | |
New-Item -Path $logDir -ItemType Directory | |
} | |
# Function to extract and log events |
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 os | |
import subprocess | |
import sys | |
# Define file directories | |
ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) | |
BIN_DIR = os.path.join(ROOT_DIR) | |
# Add directories to system path | |
sys.path.insert(0, ROOT_DIR) |
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 check_drivers_powershell(): | |
import os | |
import subprocess | |
# Dictionary of web browser drivers and their download URLs | |
drivers = { | |
"Chrome": "https://chromedriver.storage.googleapis.com/latest/chromedriver_win32.zip", | |
"Firefox": "https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-win64.zip", | |
"Edge": "https://msedgedriver.azureedge.net/LATEST_RELEASE_EDGE", | |
} |
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
@echo off | |
@REM autorun.reg | |
@prompt $m$p$g | |
@REM Windows Registry Editor Version 5.00 | |
@REM [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] | |
@REM "Autorun"="%sourcefile%" | |
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
@echo off | |
setlocal | |
set repo_url=https://github.com/DanEdens/resume.git | |
set repo_folder=resume | |
if not exist "%repo_folder%" ( | |
echo Cloning repository... | |
git clone "%repo_url%" "%repo_folder%" | |
cd "%repo_folder%" |
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 errno | |
import logging | |
import os | |
from datetime import datetime | |
from pathlib import Path | |
import paho.mqtt.client as mqtt | |
import paho.mqtt.publish as publish | |
# Create utils specific fallback logger for Debugging debug mode |
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 errno | |
import html | |
import logging | |
import os | |
import platform | |
import re | |
import socket | |
import subprocess | |
import time | |
from datetime import datetime |
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 os | |
import time | |
from selenium.common import TimeoutException | |
from selenium.webdriver import ActionChains | |
from selenium.webdriver.remote.webelement import WebElement | |
from selenium.webdriver.support import expected_conditions as expect | |
from selenium.webdriver.support.wait import WebDriverWait | |
#import testKitUtils |
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 subprocess | |
def set_variable_from_mqtt_topic(name: str, awsip: str, awsport: str, topic: str) -> str: | |
""" | |
Subscribes to the specified MQTT topic and sets the value of the variable with the specified name to the value | |
received from the topic. | |
""" | |
# Replace any equals signs in the name with colons | |
name = name.replace("=", ":") |
NewerOlder