Skip to content

Instantly share code, notes, and snippets.

View Cyb3r-Monk's full-sized avatar

Mehmet E. Cyb3r-Monk

View GitHub Profile
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
function ConvertTo-PackedGuid {
<#
.SYNOPSIS
https://gist.github.com/MyITGuy/d3e039c5ec7865edefc157fcd625a20a
Converts a GUID string into a packed globally unique identifier (GUID) string.
.DESCRIPTION
Takes a GUID string and breaks it into 6 parts. It then loops through the first five parts and reversing the order. It loops through the sixth part and reversing the order of every 2 characters. It then joins the parts back together and returns a packed GUID string.
.EXAMPLE
ConvertTo-PackedGuid -Guid '{7C6F0282-3DCD-4A80-95AC-BB298E821C44}'
@iknowjason
iknowjason / secrets-scanning.sh
Last active September 1, 2024 10:57
Scan for secrets at scale
# Secrets scanning at scale: 3 different tools
# trufflehog
#!/bin/bash
# 1. get all repos: gh repo list <organization> --limit 1000 > repos.txt
# 2. parse repos.txt so each line looks similar to: https://github.com/username/repo-name.git
# Remotely scan the repos using trufflehog without downloading
while IFS= read -r repo
do
from datetime import datetime, timedelta
from os import path
import sqlite3
import time
import json
# ===================
# DATABASE OPERATIONS
# ===================
def sqlite_instantiate(dbconfig, table="hashes"):
@mattifestation
mattifestation / TLGMetadataParser.psm1
Last active April 17, 2025 14:01
Retrieves TraceLogging metadata from a file.
#requires -version 5
<#
The things you find on Google searching for specific GUIDs...
Known Keyword friendly names:
"UTC:::CATEGORYDEFINITION.MS.CRITICALDATA":"140737488355328"
"UTC:::CATEGORYDEFINITION.MS.MEASURES":"70368744177664"
"UTC:::CATEGORYDEFINITION.MS.TELEMETRY":"35184372088832"
"UTC:::CATEGORYDEFINITION.MSWLAN.CRITICALDATA":"2147483648"
@mattmc3
mattmc3 / modern_sql_style_guide.md
Last active February 27, 2026 15:26
Modern SQL Style Guide
layout default
author mattmc3
title Modern SQL Style Guide
revision 2019-01-17
version 1.0.1
description A guide to writing clean, clear, and consistent SQL.

Modern SQL Style Guide

@scotgabriel
scotgabriel / Windows command line gui access.md
Last active January 28, 2026 06:50
Common windows functions via rundll user32 and control panel

Rundll32 commands

OS: Windows 10/8/7

Add/Remove Programs

  • RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0

Content Advisor

  • RunDll32.exe msrating.dll,RatingSetupUI

Control Panel

@Neo23x0
Neo23x0 / annotations.xml
Last active September 23, 2025 12:16
Sources for APT Groups and Operations Search Engine
<?xml version="1.0" encoding="UTF-8"?>
<Annotations start="0" num="171" total="171">
<Annotation about="www.bussink.net/*" timestamp="0x0005d7bc4022b026" href="ChF3d3cuYnVzc2luay5uZXQvKhCm4IqBxPf1Ag">
<Label name="_cse_turlh5vi4xc"/>
<AdditionalData attribute="original_url" value="https://www.bussink.net/"/>
</Annotation>
<Annotation about="*.thedfirreport.com/*" timestamp="0x0005d76dd5f8679d" href="ChUqLnRoZWRmaXJyZXBvcnQuY29tLyoQnc_hr93t9QI">
<Label name="_cse_turlh5vi4xc"/>
<AdditionalData attribute="original_url" value="https://thedfirreport.com/"/>
</Annotation>
@PCfromDC
PCfromDC / Sync AD to SQL.ps1
Last active November 8, 2019 16:55
This is a PowerShell script that grabs all users from AD and puts them into a SQL table.
# Array of Domain Controller Server Names
$DCs = @("DC01","DC02","DC03")
# Database Server
$dbServer = "sql2012-03"
# Database Name
$databaseName = "pcDemo_Personnel"
# Production System User Table Name