Skip to content

Instantly share code, notes, and snippets.

View gary23w's full-sized avatar

Garrett Stimpson gary23w

View GitHub Profile
@gary23w
gary23w / bayes-theorem-guide-statistics.md
Created October 29, 2024 12:50
Shaping and Illustrating after my morning coffee...

Bayes' Theorem: A Gary Guide

Bayes' Theorem is a fundamental concept in probability and statistics. It allows us to update our initial beliefs about an event based on new evidence. Here's a step-by-step breakdown of the theorem, its components, and a couple of examples to solidify understanding.

Key Concepts

  1. Independent Events: If events A and B are independent (they don't influence each other), then the probability that both occur is simply the product of their individual probabilities.

[ P(A \text{ and } B) = P(A) \times P(B)

@gary23w
gary23w / image-to-string.sh
Created October 15, 2024 22:26
image-to-string
#!/bin/bash
mkdir -p trocr_app
cd trocr_app
cat << 'EOF' > ocr.py
import sys
from PIL import Image
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
@gary23w
gary23w / gary.bf
Created October 7, 2024 17:35
gary was here
++++++++++[>++++++++++<-]>+++.------.+++++++++++++++++.+++++++.[-]++++++++++++++++++++++++++++++++.<+++++++[>+++++++++++++++++<-]>.----------------------.++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.<++++++++[>+++++++++++++<-]>..---.+++++++++++++.-------------.
@gary23w
gary23w / policy-service.ps1
Created November 24, 2023 15:25
policy-and-service-config
# services and policies :\
# New names for the accounts
$NewAdminName = "GaryAdmin"
$NewGuestName = "GaryGuest"
# Define the services to be disabled
$servicesToDisable = @(
"MapsBroker", # Downloaded Maps Manager
"lfsvc", # Geolocation Service
@gary23w
gary23w / matrix-screensaver.sh
Created November 16, 2023 00:54
matrix-style-cascading-screensaver-in-bash
#!/bin/bash
# free time plus a need to build a screensaver in bash, enjoy the cascade.
# ps. the key to this is the "eval" function.
# - gary
# clear the screen and hide the cursor
echo -e "\033[2J\033[?25l"
# get the number of lines and columns of the terminal
R=$(tput lines)
@gary23w
gary23w / hilbertSort.py
Last active April 7, 2023 13:51
an optimized version of the hilbert sort algorithm.
def hilbert_sort(data):
"""
Sorts an input array using Hilbert curve mapping.
Parameters:
data (list): The input array to be sorted.
Returns:
sorted_data (list): The sorted input array.
"""
@gary23w
gary23w / cyber_pentest-gary.md
Created December 4, 2022 22:27
Penetration Test Cheat Sheet

Techniques and Methodology

a gary23w production

a NON linear C by C.

typically I export all required variables. will list all vars and set tool resource list in near future.

Thank you,

@gary23w
gary23w / key_listener_mouse_position.py
Last active December 21, 2022 22:49
keypresses and window focus
## an attempt to listen to keypresses and monitor window focus
import time
import random
import re
import sys
import enum
import six
from six.moves import queue
@gary23w
gary23w / startup_resources_list.md
Last active August 13, 2024 22:42
startup tools list

Startup resource list

A revised version of IBEXSOFT awesome start up tools list.

Adding and updating as I go along.

Tech

Git Repos

@gary23w
gary23w / security_notes
Last active December 21, 2022 22:49
security+ notes
Security +
Spam filter
- Spam defined.
- in most cases, spam is defined as unsolicited bulk email(ube), or junk email. The spammer is hoping that the recipient will buy a product or service.
- Filters for spam