This file contains 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 5.1 | |
#Requires -Modules PowerShellForGitHub,PSMenu | |
Set-StrictMode -Version 3.0 | |
$InformationPreference = 'Continue' | |
function Get-PrivateRelease { | |
<# | |
.SYNOPSIS | |
Download a release from a GitHub repository. |
This file contains 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
git add -A;git commit -m "🗑 Quick Commit"; git push; |
This file contains 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 | |
Verifies that the file hash of a PowerShell open-source installer matches expected value. | |
.DESCRIPTION | |
Compares the file hash of a PowerShell open-source installation file to the expected file hash value. Supports | |
all installation file types, including msi, zip, rpm, deb, pkg, and tar.gz, beginning with installers for PowerShell | |
release 6.0.0.9. | |
To get a list of installer file names, but not test the file hash, use the ListOnly parameter. |
This file contains 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 Create an interface that allows users to customize hotkeys. | |
* @file SetHotkeyGui.ahk | |
* @link https://github.com/nperovic | |
* @author Nikola Perovic | |
* @date 2024/04/22 | |
* @version 1.0.0 | |
***********************************************************************/ | |
#Requires AutoHotkey v2 |
This file contains 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
using namespace System.Collections.Generic | |
# the final command will be | |
# git clone --branch release/v7.4 --shallow-since=2024-07-07 https://github.com/PowerShell/PowerShell | |
$cloneUrl = 'https://github.com/PowerShell/PowerShell' | |
$Since = [datetime]::Now.AddDays(-30 ) | |
$Branch = 'release/v7.4' | |
$binGit = Get-Command -Name 'git' -CommandType Application -ea 'stop' | |
# this bypasses most aliases or functions named 'git' |
This file contains 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
using namespace System.Collections.Generic | |
$RoboAppConf ??= @{ | |
Root = $PSScriptRoot | Get-Item | |
Log = @{ | |
Path = Join-Path (Get-item 'temp:') 'last-robocopy.log' | |
} | |
} | |
function Invoke-Robocopy { |
This file contains 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
rem execute as an Administrator | |
rem based on http://www.windowsdevcenter.com/pub/a/windows/2005/02/08/NTFS_Hacks.html | |
ram based on https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc938961(v=technet.10) | |
rem http://archive.oreilly.com/cs/user/view/cs_msg/95219 (some installers need 8dot3 filenames) | |
rem disable 8dot3 filenames | |
ram Warning: Some applications such as incremental backup utilities rely on this update information and do not function correctly without it. | |
fsutil behavior set disable8dot3 1 |
This file contains 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
#!/usr/bin/env bash | |
# This script clones all repos in a GitHub org and pushes to the upstream | |
# It requires the GH CLI: https://cli.github.com | |
# It can be re-run to collect new repos and pull the latest changes | |
set -euo pipefail | |
USAGE="Usage: gh-clone-org <user|org> <target>" |
This file contains 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
rm srv1.xlsx -ErrorAction Ignore | |
[xml](gc .\srv1.mbsa) | % secscan | | |
Export-Excel srv1.xlsx -AutoSize -TableName table -Show | |
# Read the new spreadsheet | |
# Import-Excel .\srv1.xlsx | |
# read, export to csv | |
# Import-Excel .\srv1.xlsx | Export-Csv -NotType srv1.csv |
This file contains 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
# Here's tiny clipboard sugar for a profile | |
# context: there was a thread about creating a custom clipboard uri, and clipboard cmdlets | |
# <https://discord.com/channels/180528040881815552/447476117629304853/1260981998479081562> | |
Import-Module Pansies | |
# It's nice to get a confirmation that your clip was saved | |
$PSDefaultParameterValues['Set-ClipBoard:PassThru'] = $true | |
Set-alias 'cl' 'Set-ClipBoard' # 'sc' already exists | |
Set-Alias 'gcl' 'Get-Clipboard' |
NewerOlder