[[TOC]]
This file contains hidden or 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
| function Invoke-Groq { | |
| [cmdletbinding()] | |
| param ( | |
| [Parameter(Mandatory, Position=0)] | |
| [ValidateNotNull()] | |
| [string]$Prompt, # The input prompt or query to be processed by the API. | |
| [Parameter(Position=1)] | |
| [ValidateNotNullOrEmpty()] | |
| [string]$APIKey = $env:GROQ_API_Key, # API key to authenticate requests to the Groq API. |
This file contains hidden or 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
| Add-type -AssemblyName System.Drawing # Required for SkiaSharp | |
| $packagespath = "G:\CSharp\GzeroFT232H\bin\Debug" | |
| gci $packagespath\*.dll | % { | |
| try { | |
| [System.Reflection.Assembly]::LoadFrom($_.FullName) | |
| } catch { | |
| Write-Host "Error loading assembly: $_" | |
| } |
This file contains hidden or 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
| function Get-CVEInfo { | |
| <# | |
| .DESCRIPTION | |
| Get-CVEInfo from CISA Vulnrichment repo. MarkGo2024. | |
| .EXAMPLE | |
| Get-CVEInfo -cveId "CVE-2024-39466" | |
| #> | |
| param ( | |
| [string]$cveId | |
| ) |
This file contains hidden or 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
| <# | |
| A MarkGo project. JUN2024. | |
| Person Sensor Developer Guide | |
| https://github.com/usefulsensors/person_sensor_docs?tab=readme-ov-file#connecting | |
| Byte format (39 bytes) | |
| -------------------- | |
| 0,1 Reserved |
This file contains hidden or 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
| <# | |
| DISCLAIMER: Script is not optimized, just a quick example and reference | |
| RESOURCES: | |
| - Csharp script doing the heavy lifting is by barrypicker; https://stackoverflow.com/a/13201219 posted Nov 2, 2012 | |
| - Use `Get-Printer` to find your Zebra Printer Name | |
| - Use https://labelary.com/viewer.html for help with ZPL and preview | |
| - Official Zebra ZPLII programming guide https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/printers/common/programming/zpl-zbi2-pm-en-pg.pdf | |
| #> |
This file contains hidden or 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
| // The provided code consists of several C# classes and namespaces that work together to facilitate USB communication with Zebra printers from a .NET application. Below is a brief overview of each component: | |
| // ZebraUsbStream.cs: Defines a ZebraUsbStream class that extends the System.IO.Stream class, specifically for communicating with Zebra printers via USB. It uses an instance of UsbPrinterConnector to handle the low-level USB operations. The class overrides several members of the Stream class, such as Read(), Write(), and Flush(), to utilize the underlying USB connection. It also manages connection state and timeouts. | |
| // FileIO.cs: Contains the FileIO class, which is a utility class providing P/Invoke signatures for various Windows API functions related to file and device I/O operations. This includes methods for creating files (CreateFile), writing to files (WriteFile), and reading from files (ReadFile), among others. These functions are used for low-level access to the USB devices. | |
| // PrinterConnecto |
This file contains hidden or 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
| $WingetCommonID = @{ | |
| "Google Chrome" = "Google.Chrome" | |
| "Microsoft Edge" = "Microsoft.Edge" | |
| "Mozilla Firefox" = "Mozilla.Firefox" | |
| "Adobe Acrobat Reader DC x64" = "Adobe.Acrobat.Reader.64-bit" | |
| "Adobe Acrobat Reader DC x32" = "Adobe.Acrobat.Reader.32-bit" | |
| "Visual Studio Code" = "Microsoft.VisualStudioCode" | |
| "Microsoft SQL Server" = "Microsoft.SQLServer" | |
| } |
This file contains hidden or 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
| <# | |
| .DESCRIPTION | |
| Author: Mark Go | |
| PowerShell script designed to check for pending patches available via SCCM (System Center Configuration Manager). It provides the ability to retrieve pending patch information for specified remote computers and can be used to identify patches that need to be installed. The script also includes the option to automatically start the WinRM service on target hosts if necessary. | |
| .EXAMPLE | |
| Get-SCCMPendingPatches SERVER01 -Verbose | |
| Get pending patches for a specific computer |
This file contains hidden or 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
| $printerIP = <IPaddrr> | |
| # $firmwareFilePath = "C:\path\to\ljM506_fs3.9.12_fw_2309088_001464.bdl" | |
| $policyType = [System.AppDomain]::CurrentDomain.GetAssemblies() | | |
| ForEach-Object { $_.GetTypes() } | | |
| Where-Object { $_.Name -eq 'TrustAllCertsPolicy' } | |
| if (-not $policyType) { | |
| $code = @" | |
| using System.Net; |
NewerOlder