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
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory=$True, ValueFromPipeline=$True)] | |
| [string]$Path | |
| ) | |
| $ErrorActionPreference = "Stop" | |
| Set-StrictMode -Version 5.0 | |
| $Path = (Resolve-Path $Path).ProviderPath |
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
| <# | |
| .SYNOPSIS | |
| Clone this repo alongside all your other code repos. Then run this script. | |
| It will automatically copy the pre-commit hook scripts to your other repos. | |
| #> | |
| [CmdletBinding()] | |
| param() | |
| $ErrorActionPreference = "Stop" | |
| Set-StrictMode -Version 5.0 |
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
| [CmdletBinding()] | |
| param( | |
| [Parameter()] | |
| [string]$Algorithm = "SHA1", | |
| [Parameter()] | |
| [Text.Encoding]$Encoding = [Text.Encoding]::UTF8 | |
| ) | |
| $ErrorActionPreference = "Stop" |
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
| $ErrorActionPreference = "Stop" | |
| <# | |
| .SYNOPSIS | |
| Will reset your colors to the scheme found in $PROFILE | |
| .DESCRIPTION | |
| Useful for when programs mess up your favorite console colors. WARNING: | |
| Will clear your screen. |
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
| #Requires -RunAsAdministrator | |
| [CmdletBinding()] | |
| param() | |
| $ErrorActionPreference = "Stop" | |
| Set-StrictMode -Version 5.0 | |
| # From https://help.logmein.com/articles/en_US/FAQ/How-do-I-clear-the-print-queue-if-a-document-is-stuck-en1 | |
| Stop-Service Spooler |
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
| #Requires -RunAsAdministrator | |
| [CmdletBinding()] | |
| param() | |
| $ErrorActionPreference = "Stop" | |
| Set-StrictMode -Version 5.0 | |
| # Not fully tested. Before you try this, try clearing IE's history and | |
| # temporary files. EVERYTHING. That will probably do it for you. |
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
| [CmdletBinding()] | |
| param( | |
| [Parameter()] | |
| [int]$PollFrequencySeconds = 2 | |
| ) | |
| $ErrorActionPreference = "Stop" | |
| Set-StrictMode -Version 5.0 | |
| $stopKey = "Q" |
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
| <# | |
| .SYNOPSIS | |
| Installs Syncthing as a Windows service | |
| .DESCRIPTION | |
| Uses NSSM (Non-Sucking Service Manager) to set up Syncthing as a Windows | |
| service. Requires both Syncthing and NSSM to already be installed. nssm.exe | |
| must be available via the PATH environment variable. | |
| .PARAMETER InstallDir |
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
| [CmdletBinding()] | |
| param() | |
| $ErrorActionPreference = "Stop" | |
| Set-StrictMode -Version 5.0 | |
| $currentId = [Security.Principal.WindowsIdentity]::GetCurrent() | |
| $principal = [Security.Principal.WindowsPrincipal]$currentId | |
| $adminRole = [Security.Principal.WindowsBuiltInRole]"Administrator" | |
| if (!$principal.IsInRole($adminRole)) { |
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
| <# | |
| .SYNOPSIS | |
| Receive PGP-encrypted messages from patchbay.pub | |
| .PARAMETER MyId | |
| Your personal PGP key fingerprint | |
| .PARAMETER PubSub | |
| "Publish / Subscribe" mode: Use this switch if multiple subscribers (you | |
| and perhaps other people) will all get the same messages from the |
OlderNewer