diff --git a/Web-Tools/FT4232H-Pinout-Solver.html b/Web-Tools/FT4232H-Pinout-Solver.html deleted file mode 100644 index a74d3ff..0000000 --- a/Web-Tools/FT4232H-Pinout-Solver.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - FT4232H PINOUT SOLVER - - - -

FT4232H Pinout Solver

-

- -
-
-

UART / Serial / RS232/422/485

- For Channels Available: A, B, C, and D
- Max Supported Baud: 12 mbaud / 12,000,000 baud

- UART Channel A: - - - - - - - - - - -
Channel Pin Name Pin No Use
A ADBUS 0 16 TXD / TX / Transmit
A ADBUS 1 17 RXD / RX / Receive
A ADBUS 2 18 RTS# / RTS / Request To Send
A ADBUS 3 19 CTS# / CTS / Clear To Send
A ADBUS 4 21 DTR# / DTR / Data Terminal Ready
A ADBUS 5 22 DTR# / DTR / Data Set Ready
A ADBUS 6 23 DCD# / DCD / Data Carrier Detect
A ADBUS 7 24 RI# / Ring Indicator / TXDEN
-
- - UART Channel B: - - - - - - - - - - -
Channel Pin Name Pin No Use
B BDBUS 0 26 TXD / TX / Transmit
B BDBUS 1 27 RXD / RX / Receive
B BDBUS 2 28 RTS# / RTS / Request To Send
B BDBUS 3 29 CTS# / CTS / Clear To Send
B BDBUS 4 30 DTR# / DTR / Data Terminal Ready
B BDBUS 5 32 DTR# / DTR / Data Set Ready
B BDBUS 6 33 DCD# / DCD / Data Carrier Detect
B BDBUS 7 34 RI# / Ring Indicator / TXDEN
-
- - UART Channel C: - - - - - - - - - - -
Channel Pin Name Pin No Use
C CDBUS 0 38 TXD / TX / Transmit
C CDBUS 1 39 RXD / RX / Receive
C CDBUS 2 40 RTS# / RTS / Request To Send
C CDBUS 3 41 CTS# / CTS / Clear To Send
C CDBUS 4 43 DTR# / DTR / Data Terminal Ready
C CDBUS 5 44 DTR# / DTR / Data Set Ready
C CDBUS 6 45 DCD# / DCD / Data Carrier Detect
C CDBUS 7 46 RI# / Ring Indicator / TXDEN
-
- - UART Channel D: - - - - - - - - - - -
Channel Pin Name Pin No Use
D DDBUS 0 48 TXD / TX / Transmit
D DDBUS 1 52 RXD / RX / Receive
D DDBUS 2 53 RTS# / RTS / Request To Send
D DDBUS 3 54 CTS# / CTS / Clear To Send
D DDBUS 4 55 DTR# / DTR / Data Terminal Ready
D DDBUS 5 57 DTR# / DTR / Data Set Ready
D DDBUS 6 58 DCD# / DCD / Data Carrier Detect
D DDBUS 7 56 RI# / Ring Indicator / TXDEN
-
- -
-

SPI / Serial Peripheral Interface

- Two Channels Available: A and B

- - SPI Channel A: - - - - - - -
Channel Pin Name Pin No Use
A ADBUS 0 12 SK / SCLK / TCK / CLK / Serial Clock
A ADBUS 1 13 DO / MISO / Serial Data Output
A ADBUS 2 14 DI / MOSI / Serial Data Input
A ADBUS 3 15 CS / SS / TMS / Chip Select
-
- - SPI Channel B: - - - - - - -
Channel Pin Name Pin No Use
B BDBUS 0 22 SK / SCLK / TCK / CLK / Serial Clock
B BDBUS 1 23 DO / MISO / Serial Data Output
B BDBUS 2 24 DI / MOSI / Serial Data Input
B BDBUS 3 25 CS / SS / TMS / Chip Select
-
- -
-

I2C

- Two Channels Available: A and B

- - I2C Channel A: - - - - - - -
Channel Pin Name Pin No Use
A ADBUS 0 12 SK / SCLK / TCK / CLK / Serial Clock
A ADBUS 1 13 DO / MISO / Serial Data Output
A ADBUS 2 14 DI / MOSI / Serial Data Input
A ADBUS 3 15 CS / SS / TMS / Chip Select
-
- - I2C Channel B: - - - - - - -
Channel Pin Name Pin No Use
B BDBUS 0 22 SK / SCLK / TCK / CLK / Serial Clock
B BDBUS 1 23 DO / MISO / Serial Data Output
B BDBUS 2 24 DI / MOSI / Serial Data Input
B BDBUS 3 25 CS / SS / TMS / Chip Select
-
- -
-

JTAG

- Two Channels Available: A and B

- - JTAG Channel A: - - - - - - -
Channel Pin Name Pin No Use
A ADBUS 0 12 TCK / CLK / Test Interface Clock
A ADBUS 1 13 TDI / DO / Test Data Input
A ADBUS 2 14 TDO / DI / Test Data Output
A ADBUS 3 15 TMS / CS / Test Mode Select
-
- - JTAG Channel B: - - - - - - -
Channel Pin Name Pin No Use
B BDBUS 0 22 TCK / CLK / Test Interface Clock
B BDBUS 1 23 TDI / DO / Test Data Input
B BDBUS 2 24 TDO / DI / Test Data Output
B BDBUS 3 25 TMS / CS / Test Mode Select
-
- -
-

Bit-Bang Interface

- Two Channels Available: C and D

- - Big-Bang Channel C: - - - - - - - - - - -
Channel Pin Name Pin No Use
C CDBUS 0 38 D0
C CDBUS 1 39 D1
C CDBUS 2 40 D2
C CDBUS 3 41 D3
C CDBUS 4 43 D4
C CDBUS 5 44 D5
C CDBUS 6 45 D6
C CDBUS 7 47 D7
-
- - Big-Bang Channel D: - - - - - - - - - - -
Channel Pin Name Pin No Use
D DDBUS 0 48 D0
D DDBUS 1 52 D1
D DDBUS 2 53 D2
D DDBUS 3 54 D3
D DDBUS 4 55 D4
D DDBUS 5 57 D5
D DDBUS 6 58 D6
D DDBUS 7 59 D7
-
-
- -
-

Common Pins

- - - - - - - -
Pin Name Pin No Use
GND 1,5,11,15,25,35,47,51 GND / Ground
OSCI 2 Oscillator Input
OSCO 3 Oscillator Output
REF 6 Current Reference Input - connect via 12Ko resistor @1% to GND
RESET# 14 Reset Input (Active Low)
-
-
- -
-

Config Options / More Info

- - Links: - -
- - Multi-Channel Options:
-
-
-
- - - diff --git a/Windows-Scripts/checksum.ps1 b/Windows-Scripts/checksum.ps1 new file mode 100644 index 0000000..c97db57 --- /dev/null +++ b/Windows-Scripts/checksum.ps1 @@ -0,0 +1,277 @@ +[CmdletBinding(DefaultParameterSetName='Generate')] +param( + # File(s) or wildcard pattern to compute checksum for + [Parameter(Position = 0, ParameterSetName = 'Generate', ValueFromPipeline = $true)] + [Parameter(Position = 0, ParameterSetName = 'Match', ValueFromPipeline = $true)] + [string[]]$FilePath, + + # Output file to save generated checksums (-o mode) + [Parameter(Mandatory = $false, ParameterSetName = 'Generate')] + [Alias('o')] + [string]$OutFile, + + # File containing checksums to verify (-c mode) + [Parameter(Mandatory = $false, ParameterSetName = 'Verify')] + [Alias('c')] + [string]$Check, + + # Direct checksum hash string to match against (-m mode) + [Parameter(Mandatory = $true, ParameterSetName = 'Match')] + [Alias('m')] + [string]$Match, + + # Hashing algorithm to use (Defaults to SHA256) + [Parameter(Mandatory = $false)] + [Alias('a')] + [ValidateSet('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5')] + [string]$Algorithm, + + # Help flag (-h, -Help) + [Parameter(Mandatory = $false)] + [Alias('h')] + [switch]$Help +) + +begin { + function Show-Help { + @' +NAME + checksum - Compute and verify message digests / file checksums + +SYNOPSIS + .\checksum.ps1 [-FilePath] [-OutFile ] [-Algorithm ] + .\checksum.ps1 [-FilePath] -Match [-Algorithm ] + .\checksum.ps1 -Check [-Algorithm ] + .\checksum.ps1 -Help + +DESCRIPTION + Computes or verifies checksums using various cryptographic algorithms. + Outputs hash values in standard Linux utility format ( ). + +PARAMETERS + -FilePath + Specifies the path to one or more files to hash. Accepts wildcards (*). + + -o, -OutFile + Specifies an output file to save the checksum results to, while still + displaying the output on screen. + + -c, -Check + Read checksums from the specified file and verify them against files on disk. + + -m, -Match + Compare the computed hash of the target file(s) against a specific hash string. + + -a, -Algorithm + Specifies the cryptographic hash algorithm to use. + Supported values: SHA1, SHA256 (default), SHA384, SHA512, MD5. + If omitted in -c or -m mode, the algorithm is auto-detected by hash length. + + -h, -Help + Display this help message. + +EXAMPLES + 1. Compute SHA256 checksum for a single file: + .\checksum.ps1 myfile.iso + + 2. Compute checksums for all files and write to a file while showing output: + .\checksum.ps1 * -o checksums.sha256 + + 3. Verify a file against a explicit hash string: + .\checksum.ps1 myfile.iso -m "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + + 4. Verify checksums from a verification file (auto-detects algorithm): + .\checksum.ps1 -c checksums.sha256 +'@ + } + + # Helper function to auto-detect hash algorithm based on string character length + function Get-AlgorithmFromHashLength { + param([string]$HashString) + + switch ($HashString.Trim().Length) { + 32 { return 'MD5' } + 40 { return 'SHA1' } + 64 { return 'SHA256' } + 96 { return 'SHA384' } + 128 { return 'SHA512' } + default { + Write-Error "checksum: Could not auto-detect algorithm for hash length $($HashString.Length). Please specify -Algorithm." + return $null + } + } + } +} + +process { + # Match help arguments passed either as switch (-h, -Help) or positional string ('help', 'h', '--help', etc.) + $isHelpRequested = $Help.IsPresent -or ( + $FilePath -and $FilePath.Count -eq 1 -and ( + $FilePath[0] -match '^(?i)[-/]{0,2}(h|help)$' + ) + ) + + if ($isHelpRequested) { + Show-Help + return + } + + # Normalize explicit algorithm input if provided + if (-not [string]::IsNullOrWhiteSpace($Algorithm)) { + $Algorithm = $Algorithm.ToUpper() + } + + # --- DIRECT MATCH MODE (-m / -Match) --- + if ($PSCmdlet.ParameterSetName -eq 'Match') { + if (-not $FilePath -or $FilePath.Count -eq 0) { + Write-Error "checksum: Missing file path parameter for matching. Use -Help for usage." + return + } + + # Auto-detect algorithm from provided -Match hash string if not explicitly given + if ([string]::IsNullOrWhiteSpace($Algorithm)) { + $Algorithm = Get-AlgorithmFromHashLength -HashString $Match + if (-not $Algorithm) { return } + Write-Verbose "Auto-detected algorithm: $Algorithm" + } + + $expectedHash = $Match.Trim().ToLower() + + foreach ($pathEntry in $FilePath) { + $resolvedItems = Get-Item -Path $pathEntry -ErrorAction SilentlyContinue + + if (-not $resolvedItems) { + Write-Error "checksum: $pathEntry`: No such file or directory" + continue + } + + foreach ($item in $resolvedItems) { + if ($item.PSIsContainer) { + Write-Error "checksum: $($item.Name)`: Is a directory" + } else { + $actualHash = (Get-FileHash -Path $item.FullName -Algorithm $Algorithm).Hash.ToLower() + $targetFile = Resolve-Path -Path $item.FullName -Relative + if ($targetFile.StartsWith(".\")) { $targetFile = $targetFile.Substring(2) } + + if ($actualHash -eq $expectedHash) { + Write-Host "${targetFile}: " -NoNewline + Write-Host "OK" -ForegroundColor Green + } else { + Write-Host "${targetFile}: " -NoNewline + Write-Host "FAILED" -ForegroundColor Red + } + } + } + } + } + # --- VERIFICATION MODE (-c / -Check) --- + elseif ($PSCmdlet.ParameterSetName -eq 'Verify') { + if (-not (Test-Path -Path $Check -PathType Leaf)) { + Write-Error "checksum: $Check`: No such file or directory" + return + } + + $lines = Get-Content -Path $Check + + # Auto-detect algorithm based on hash length if not explicitly provided + if ([string]::IsNullOrWhiteSpace($Algorithm)) { + foreach ($line in $lines) { + if ([string]::IsNullOrWhiteSpace($line) -or $line.StartsWith("#")) { continue } + if ($line -match '^([a-fA-F0-9]+)\s+') { + $Algorithm = Get-AlgorithmFromHashLength -HashString $Matches[1] + if (-not $Algorithm) { return } + Write-Verbose "Auto-detected algorithm: $Algorithm" + break + } + } + + # Fallback if file contained no parsable hashes + if ([string]::IsNullOrWhiteSpace($Algorithm)) { + $Algorithm = 'SHA256' + } + } + + foreach ($line in $lines) { + # Skip empty lines or comments + if ([string]::IsNullOrWhiteSpace($line) -or $line.StartsWith("#")) { continue } + + # Match standard checksum output format: " [* ]" + if ($line -match '^([a-fA-F0-9]+)\s+[* ]?(.*)$') { + $expectedHash = $Matches[1].ToLower() + # Strip leading whitespace and any leftover leading asterisk + $targetFile = $Matches[2].Trim().TrimStart('*') + + if (Test-Path -Path $targetFile -PathType Leaf) { + $actualHash = (Get-FileHash -Path $targetFile -Algorithm $Algorithm).Hash.ToLower() + + if ($actualHash -eq $expectedHash) { + Write-Host "${targetFile}: " -NoNewline + Write-Host "OK" -ForegroundColor Green + } else { + Write-Host "${targetFile}: " -NoNewline + Write-Host "FAILED" -ForegroundColor Red + } + } else { + Write-Host "${targetFile}: " -NoNewline + Write-Host "FAILED open or read" -ForegroundColor Red + } + } else { + Write-Warning "checksum: improperly formatted line: $line" + } + } + } + # --- GENERATION MODE --- + else { + # Default to SHA256 if no algorithm was specified in generation mode + if ([string]::IsNullOrWhiteSpace($Algorithm)) { + $Algorithm = 'SHA256' + } + + if (-not $FilePath -or $FilePath.Count -eq 0) { + Write-Error "checksum: Missing file path parameter. Use -Help for usage." + return + } + + # Clear/initialize output file if specified before writing hashes + if (-not [string]::IsNullOrWhiteSpace($OutFile)) { + $null = New-Item -Path $OutFile -ItemType File -Force + } + + foreach ($pathEntry in $FilePath) { + # Resolve wildcards and single file inputs + $resolvedItems = Get-Item -Path $pathEntry -ErrorAction SilentlyContinue + + if (-not $resolvedItems) { + Write-Error "checksum: $pathEntry`: No such file or directory" + continue + } + + foreach ($item in $resolvedItems) { + # Handle directories like Linux sha256sum does + if ($item.PSIsContainer) { + Write-Error "checksum: $($item.Name)`: Is a directory" + } else { + $hash = (Get-FileHash -Path $item.FullName -Algorithm $Algorithm).Hash.ToLower() + + # Format standard relative path (stripping leading '.\') + $relativePath = Resolve-Path -Path $item.FullName -Relative + if ($relativePath.StartsWith(".\")) { + $relativePath = $relativePath.Substring(2) + } + + $outputLine = "$hash $relativePath" + + # If -OutFile is provided, write line to file + if (-not [string]::IsNullOrWhiteSpace($OutFile)) { + Add-Content -Path $OutFile -Value $outputLine + } + + # Output to stdout + Write-Output $outputLine + } + } + } + } +} + +end {} \ No newline at end of file diff --git a/Windows-Scripts/checksums.ps1 b/Windows-Scripts/checksums.ps1 deleted file mode 100644 index 636885e..0000000 --- a/Windows-Scripts/checksums.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -b960c475a456cd4ca4df9228e6935d26aba2d3de a_very_normal_test_file.txt -49af6ace2910bb5f533149065a7c2ee669c09ea9 alert.ps1 -8a0c16f254bb9571708350aab7beb99e0dca3e8b checksum.ps1 -8a0c16f254bb9571708350aab7beb99e0dca3e8b checksums.ps1 -8393fe88bab4ce86cf9a1f13949b8db371326bf2 ffmpreg_gif_loopy.ps1 -f9fd13e485e1254a30279de16c243354e58e411c FIND_THE_FUCKING_PI.ps1 -64c0df71f41403614e9d20ea33c710915f90d590 get_wsl_usb.ps1 -9e36220ef01b549c8504877d668c8833cd71fa4a gitshit.ps1 -a06a596f11d87a8a9a2d87bf7538e9f5c2786d93 gitsync.ps1 -4eea8bba2f6f2f12dc85aa6d7ac53f2d1fbbd1b0 IM_SO_TIRED_BOSS.ps1 -4f3b3e0add2d3cb3b93c7c39bfbf547695a18a2c md5sum.ps1 -79fa68ebfb087c2d2bc2b1a805cc1604ecbd5e7e monitor-copy.txt -6ed64c41888586e4d1c06137a8813fc906d5e5db pi-ascii-powershell.ps1 -56c8acf528e19e2cbf9cdbc5648577f35ec74587 redundant-backup.ps1 -747560d92967b308de0a467d129f15b0c1136724 scan_subnets_for_port.ps1 -a47661cc0dd39493bf6e531fb3448c68c0a93439 sha1sum.ps1 -575c1bc33ce2491cf7069b1bc6984d268a84dcc4 sha256sum.ps1 -4ad867d4b1b070f49255efc61e80f2098d843b6f sha384sum.ps1 -0bf441799d73d07c1223979c5c53640a09b25638 sha512sum.ps1 -19ee7ac9242165951ad6056280e014c5811b2b31 ssh-wait-loop.ps1 -09bdf386e755f5ca339d2e9edddc7a10bbf88511 subnets.txt -50d093581df1e4031662fd91491c3494dfcc0fd9 sync_media.ps1 -086ad24aa6b5d8d97e98392da06faa805e95ee2f syncstatus.ps1 -e38f48eea08e3c2f4c28b736d64152a19676cb5d tag.txt -d644db4aaf1e31a7c9b2f5cb41f11d74ae136605 tea-cli.exe -dafe05b34aaf8a9c0ff80ad27cab0dc5780cf2e2 testtime.ps1 -75219e011a3aeb01e92546485c5de9d480ccbfd5 wait-on-host.ps1 -a02db4524ff453394e8246e950a197cbc691f4bd waypoint.ps1 -0a6f65c3aeeacf8a381faab9834a992b5d297a52 webhook.ps1 -23171433219f70e576f400bbc88a77ceba7c9822 webhook.txt -6b4ce2df2b7e2d63b6415adc7e7ba45e0ff5c9fa windows-repair.ps1 -23a95097cbcbbc536f1e8ef3eb8737fb1b3bbf7b winhash.ps1 diff --git a/Windows-Scripts/waypoint.ps1 b/Windows-Scripts/waypoint.ps1 index 345db9f..f7386c7 100644 --- a/Windows-Scripts/waypoint.ps1 +++ b/Windows-Scripts/waypoint.ps1 @@ -1,9 +1,23 @@ -if ($args[0]) { $commit_message=($args -join " ") } # if arg0 exists, join all passed args with spaces -else { $commit_message="waypoint" } # or default to "waypoint" +# waypoint.ps1 -Write-Host "WAYPOINT!`n`tCommit Message: $commit_message`n" -# add and commit +if (-not (Test-Path -Path ".\.git" -PathType Container)) { + Write-Host "No .git folder detected. Initializing new Git repository..." -ForegroundColor Yellow + git init +} else { + Write-Host "Git repository detected. Creating waypoint..." -ForegroundColor Cyan +} + +# Stage all changes git add . -git commit -m "$commit_message" -Write-Host "`nDone :`"3" \ No newline at end of file +# Format the timestamp with timezone offset/ID string +$timestamp = (Get-Date).ToString("yyyy-MM-dd-HHmm") + "-" + ((Get-TimeZone).Id -creplace '[a-z\s]', '') + +# Capture current git status output +$statusOutput = (git status | Out-String).Trim() + +# Construct the commit message +$commitMessage = "WAYPOINT $timestamp`n`n$statusOutput" + +# Execute commit +git commit -m "$commitMessage" \ No newline at end of file