Skip to content

Instantly share code, notes, and snippets.

View PSingletary's full-sized avatar
🔍
Search

PSingletary PSingletary

🔍
Search
View GitHub Profile
@keithga
keithga / Update-INIFiles.ps1
Created September 16, 2017 03:34
Update CustomSettings.ini file.
<#
.SYNOPSIS
Update CustomSettings.ini file.
.DESCRIPTION
Updates one or more CUstomSettings.ini files with a common value.
Calling powershell.exe instance must have read/write privelages to the share.
@jdhitsolutions
jdhitsolutions / PSWho.ps1
Last active November 10, 2023 15:58
A PowerShell function for getting user metadata. See help for more details.
Function Get-PSWho {
<#
.SYNOPSIS
Get PowerShell user summary information
.DESCRIPTION
This command will provide a summary of relevant information for the current
user in a PowerShell session. You might use this to troubleshoot an end-user
problem running a script or command. The default behavior is to write an
object to the pipeline, but you can use the -AsString parameter to force the
@PSingletary
PSingletary / Script_Template.ps1
Last active December 18, 2017 12:39 — forked from 9to5IT/Script_Template.ps1
PowerShell: Script Template
<#
.SYNOPSIS
<A brief description of the function or script. This keyword can be used only once in each topic.>
.DESCRIPTION
<A detailed description of the function or script. This keyword can be used only once in each topic.>
.PARAMETER <Parameter-Name>
<The description of a parameter. Add a ".PARAMETER" keyword for each parameter in the function or script syntax.
Type the parameter name on the same line as the ".PARAMETER" keyword. Type the parameter description on the lines following the ".PARAMETER" keyword. Windows PowerShell interprets all text between the ".PARAMETER" line and the next keyword or the end of the comment block as part of the parameter description. The description can include paragraph breaks.
@Desani
Desani / ScanMedia.md
Last active March 15, 2025 12:38
3.6 - Corrected issues with determining terminal size in specific use cases. Added file encoding thanks to recommendation by LordKenmou. Fixed update script checker.

This script utilizes ffmpeg, the same tool Plex uses, to decode the video stream and captures the output for any errors during playback and sends the playback errors to a log file. So essentially it plays the video in the background faster than regular speed. It then checks the error output log file to see if there is anything inside. If ffmpeg was able to cleanly play the file, it counts as a passed file. If there is any error output, an error could be anything from a container issue, a missed frame issue, media corruption or more, it counts the file as failed. So if there would be an issue with playback and a video freezing, it would be caught by this method of checking for errors. Because of the nature of the error log, any errors that show up, even simple ones, will all count as a fail and the output is captured so you can view the error log. Some simple errors are easy to fix so I have included an auto-repair feature which attempts to re-encode the file which is able to correct some issues that would cau

@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active May 16, 2025 01:02
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@jdhitsolutions
jdhitsolutions / New-HTMLDiskReport.ps1
Last active November 8, 2024 20:34
A PowerShell function to create an html report showing drive utilization. Includes tooltip popup details and a color gradient.
#requires -version 3.0
Function New-HTMLDiskReport {
<#
.Synopsis
Create a disk utilization report with gradient coloring
.Description
This command will create an HTML report depicting drive utilization through a gradient color bar.
@Bluscream
Bluscream / obs_twitch_chat.css
Last active March 22, 2025 11:54
Twitch chat transparent popout for OBS
/*
Twitch chat browsersource CSS for OBS
Original by twitch.tv/starvingpoet modified by github.com/Bluscream
Just set the URL as either one of
- https://www.twitch.tv/%%TWITCHCHANNEL%%/chat?popout=true
- https://www.twitch.tv/popout/%%TWITCHCHANNEL%%/chat
- https://www.twitch.tv/embed/%%TWITCHCHANNEL%%/chat?parent=localhost
And paste this entire file into the CSS box or paste direct import css like
$URL = 'https://aka.ms/wsl-ubuntu-1804'
$Filename = "$(Split-Path $URL -Leaf).appx"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri $URL -OutFile $Filename -UseBasicParsing
Invoke-Item $FileName
$URLs = "https://aka.ms/wsl-ubuntu-1804" ,"https://aka.ms/wsl-ubuntu-1804-arm" ,"https://aka.ms/wsl-ubuntu-1604" ,"https://aka.ms/wsl-debian-gnulinux" ,"https://aka.ms/wsl-kali-linux" ,"https://aka.ms/wsl-opensuse-42" ,"https://aka.ms/wsl-sles-12"
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Foreach($URL in $URLs){
$Filename = "$(Split-Path $URL -Leaf).appx"
Write-Host "Downloading: $Filename" -Foreground Yellow -NoNewline
try{
Invoke-WebRequest -Uri $URL -OutFile $Filename -UseBasicParsing
Add-AppxPackage -Path $Filename
@infamousjoeg
infamousjoeg / CYBRAutomation.md
Last active May 8, 2025 03:10
CyberArk Automation - Greatest Hits!