Skip to content

Instantly share code, notes, and snippets.

View DanEdens's full-sized avatar
🧑‍🔬
Swarmonomicon grows more mad by the day. Only a mess can pave the way.

Dan Edens DanEdens

🧑‍🔬
Swarmonomicon grows more mad by the day. Only a mess can pave the way.
View GitHub Profile
@DanEdens
DanEdens / vitrual_desktop_script_windows_outdated
Created February 11, 2025 13:40
vitrual_desktop_script_windows_outdated
from ctypes.wintypes import HRESULT, HWND, BOOL, POINTER, DWORD, INT, UINT, LPVOID, ULONG
import comtypes
import ctypes
from comtypes import helpstring, COMMETHOD
from comtypes.GUID import GUID
REFGUID = POINTER(GUID)
REFIID = REFGUID
ENUM = INT
@DanEdens
DanEdens / .doskey
Created February 8, 2025 21:21
my public doskeys
@REM Use my .rc.cmd script to setup autoloading.
_eg=EventGhost.exe -e $*
tcpip=adb -s $1 tcpip 5555
,=popd
...=cd .. $T cd ..
..=cd ..
.=pushd "%jobpath%"
.boot=%editor% C:\Users\Dan\.bootscripts\.boot.cmd
+++=%charm% $*
@DanEdens
DanEdens / captcha-bot.md
Created November 16, 2024 18:06 — forked from ruvnet/captcha-bot.md
automate the process of solving CAPTCHAs using a desktop computer, you can combine several approaches involving automation tools

To automate the process of solving CAPTCHAs using a desktop computer, you can combine several approaches involving automation tools, CAPTCHA solving services, and scripting. Here’s a detailed guide on how to set this up:

Using Automation Tools

Power Automate Desktop

You can use Power Automate Desktop (formerly Microsoft Power Automate Desktop) to automate the interaction with the CAPTCHA. Here’s a general outline based on the videos and descriptions provided:

  1. Capture CAPTCHA Image:
    • Use Power Automate Desktop to capture a screenshot of the CAPTCHA challenge.
  • Extract the CAPTCHA image from the screenshot[1][4].
@DanEdens
DanEdens / gist:4586c26f72cbccfc232cdee240824d1f
Created November 30, 2023 03:49
git commit as code prompt
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.
@DanEdens
DanEdens / WinSystemSnapshot.ps1
Created November 5, 2023 22:26
PowerShell script to capture a detailed Windows system snapshot. Collects event logs, installed apps, system info, services, disk space, network config, and user accounts. Consolidates into a master log.
# 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
@DanEdens
DanEdens / __main__.py
Last active January 18, 2025 21:43
simple-mqtt-server-agent
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)
@DanEdens
DanEdens / check_selenium_driver.py
Created June 25, 2023 23:38
install selenium drivers
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",
}
@DanEdens
DanEdens / .rc.cmd
Created June 19, 2023 02:22
Windows persistent aliases
@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%"
@DanEdens
DanEdens / toggleLocalRepo.cmd
Created June 16, 2023 16:51
Git repo Toggle. Will either re-Clone or autocommit and delete. I made this to be able to remove clutter without losing easy access to it. Includes sh and cmd versions
@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%"
@DanEdens
DanEdens / mqtt_handler.py
Created May 12, 2023 13:33
mqtt python logger
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