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 | |
Contains a class and function to output dependencies for one or all packages on a given system. | |
.Description | |
Contains a PackageDependencyChain class that will find dependencies for locally installed, or CCR available, packages. | |
This can be used manually, or a tree can be shown via the Get-ChocolateyDependencies function. | |
.Example |
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 Test-LicenseSignature { | |
<# | |
.Synopsis | |
Verifies a license is valid for usage, e.g. hasn't been mangled by a filter. | |
.Description | |
Loads the XML file and checks the signature without a private key. | |
.Link | |
https://learn.microsoft.com/en-us/dotnet/standard/security/how-to-verify-the-digital-signatures-of-xml-documents | |
.Example | |
Test-LicenseSignature -Path ~\Downloads\chocolatey.license.xml.txt |
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 Reset-PSADTDeferHistory { | |
[CmdletBinding(SupportsShouldProcess)] | |
param( | |
[Parameter(Mandatory)] | |
[ArgumentCompleter({ | |
param($1, $2, $WordToComplete, $4, $BoundParams) | |
Get-ChildItem HKLM:\SOFTWARE\PSAppDeployToolkit\DeferHistory\ | ForEach-Object { | |
$Id, $Version, $Language, $Count = (Split-Path $_.Name -Leaf).Split('_') | |
@{Id = $Id; Version = $Version; Language = $Language; Count = $Count} | |
} | Where-Object Id -like "$WordToComplete*" | ForEach-Object { |
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 | |
function Update-ChocolateyNexusSource { | |
<# | |
.Synopsis | |
Updates Chocolatey sources that seem to be Sonatype Nexus Repository NuGet repositories to use the v3 'Index.json' | |
.Example | |
Update-ChocolateyNexusSource -WhatIf | |
# Preview changes that will be made. |
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
// Gets the last URL in the chain and decodes it, generally good for when an e-mail clickthrough | |
// is blocked by uBlock and then goes to a blocked tracker-site anyway... | |
javascript:(function() {window.location=decodeURIComponent(decodeURIComponent(location.href.replace(/.+(https.+?)$/,'$1')))}) |
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
# This assumes you have Chocolatey and Chocolatey.Extension installed and licensed correctly. | |
if (-not ('Nuget.Versioning.VersionRange' -as [type])) { | |
try { | |
Add-Type -AssemblyName $env:ChocolateyInstall\choco.exe | |
} catch { | |
$null = [System.Reflection.Assembly]::Loadfrom("$env:ChocolateyInstall\choco.exe") | |
} | |
} | |
function Get-InternalizedPackage { |
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 -Version 6.1 | |
[CmdletBinding()] | |
param( | |
[uint16]$Last = 20 | |
) | |
if (-not $cache:CachedCalls) { | |
$cache:CachedCalls = @{} | |
} |
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( | |
# The directory to output all files to. If not provided, defaults to 'C:\choco-setup\files'. | |
[Parameter()] | |
[string]$OutputDirectory = $(Join-Path $env:SystemDrive 'choco-setup\files'), | |
# The branch or PR to download. If not provided, defaults to 'main'. | |
[Parameter()] | |
[Alias('PR')] | |
[string]$Branch = $env:CHOCO_QSG_BRANCH, |
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
# See: https://docs.google.com/document/d/18mxnyYSm39cbceA2FxFLiOfyyanaBY6ogG7oscgghxU/ for some documentation | |
# and, for some context: https://github.com/cad0p/settleup-stripe/blob/master/functions/index.js | |
param( | |
[ValidateSet("settle-up-live", "settle-up-sandbox")] | |
$script:FirebaseEnvironment = "settle-up-sandbox" | |
) | |
enum currency { | |
GBP | |
USD |
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
[ | |
{ | |
"title": "Diablo III", | |
"target": "/home/deck/.local/share/Steam/steamapps/compatdata/2880652453/pfx/drive_c/Program Files (x86)/Diablo III/Diablo III.exe", | |
"startIn": "/home/deck/.local/share/Steam/steamapps/compatdata/2880652453/pfx/drive_c/Program Files (x86)/Diablo III/", | |
"launchOptions": "-launch" | |
} | |
] |
NewerOlder