Skip to content

Instantly share code, notes, and snippets.

View CyMadigan's full-sized avatar
🏡
Working from 127.0.0.1

Cyril Madigan CyMadigan

🏡
Working from 127.0.0.1
View GitHub Profile
@jhoneill
jhoneill / Show-help.ps1
Created February 4, 2021 17:48
A PowerShell Productivity hack - put help in it's own window
function Show-Help {
<#
.Synopsis
Open help in "Show window" mode
#>
param (
[parameter(ValueFromPipeline=$true)]
[ArgumentCompleter({
param($commandName, $parameterName,$wordToComplete,$commandAst,$fakeBoundParameter)
[System.Management.Automation.CompletionCompleters]::CompleteCommand($wordToComplete)
@jdhitsolutions
jdhitsolutions / ANSIGreeting.ps1
Last active August 3, 2025 01:07
PowerShell Candy - my demo files from the PSPowerHour on 26 May, 2020
#requires -version 7.0
$am = @"
_____ __ __ ___ _ __ ______
/ ___/__ ___ ___/ / / |/ /__ _______ (_)__ ___ _ __ / /__ / _/ _/
/ (_ / _ \ _ \ _ / / /|_/ / _ \/ __/ _ \/ / _ \ _ `/ / // / -_) _/ _/
\___/\___\___\_,_/ /_/ /_/\___/_/ /_//_/_/_//_\_, ( ) \___/\__/_//_/
/___/|/
"@
@jdhitsolutions
jdhitsolutions / lxprofile.ps
Last active August 3, 2025 01:07
My Windows Terminal settings.json file
#lxprofile.ps1
#this is for Linux based computers
$os = $PSVersionTable.OS
$lsb = lsb_release -d
$osver = ($lsb -split ":")[1].Trim()
$elevated = "N/A"
$user = [System.Environment]::UserName
$computer = [System.Environment]::MachineName
@JustinGrote
JustinGrote / New-EncryptedKeepassShortcut.ps1
Created January 31, 2020 23:53
Create a Credential Manager Encrypted Keepass Shortcut
[CmdletBinding(SupportsShouldProcess)]
param (
[Parameter(Mandatory)][String]$KeePassDBPath,
$Destination = (Join-Path ([Environment]::GetFolderPath('Desktop')) (((Split-Path $KeePassDBPath -leaf) -replace '.kdbx$','') + '.lnk')),
[String]$KeePassExePath = ((command keepass.exe).source),
[Parameter(Mandatory,ValueFromPipeline)]$SecurePassword
)
end {
$ErrorActionPreference = 'Stop'
@paulmallon
paulmallon / Get-GitRepo.ps1
Created November 21, 2019 20:15
Powershell function to clone a git repository with tracking of all remote branches.
function Get-GitRepo {
param(
[Parameter(Position=0, Mandatory)]
$url,
[Parameter()]
[switch]
$DoNotTrackRemoteBranches
)
@akrabat
akrabat / Vagrantfile
Last active July 3, 2025 07:05
Example Vagrantfile for Windows
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Base box: https://github.com/akrabat/packer-templates
Vagrant.configure("2") do |config|
config.vm.box = "19ft/windows2016"
config.vm.guest = :windows
config.vm.boot_timeout = 600
@ddneves
ddneves / IgniteDownloader.ps1
Last active January 14, 2026 19:21
Ignite Downloader
#########################################################################################
## Author: David das Neves
## Date: 15.12.2019
## Description: Filtering of Ignite session files with OutGridView
## Downloading with 10 downloads in parallel including resume functionality
#########################################################################################
# Start PowerShell as admin
# via code: Start-Process powershell -Verb runAs
@justinyoo
justinyoo / bolierplate-index.ts
Last active June 6, 2020 18:09
Building Azure DevOps Extension on Azure DevOps
import * as path from 'path';
import * as tl from 'azure-pipelines-task-lib/task';
async function run() {
}
run();
@nohwnd
nohwnd / Import-Script.psm1
Created February 17, 2019 19:04
Importing self-contained scripts. Demo for PSPowerHour.
function Import-Script {
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[String] $Path,
[Hashtable] $Parameters = @{},
[Object[]] $Arguments = @(),
[String] $EntryPoint = 'Main'
)
@nyanhp
nyanhp / CookingALab.ps1
Last active May 11, 2021 15:52
Using AutomatedLab recipes
Install-Module AutomatedLab.Recipe -AllowClobber -Force
# Inline definition and execution
LabRecipe MySuperLab {
DeployRole = 'Domain', 'SQL'
VmPrefix = 'LB'
} | Invoke-LabRecipe
# Store a lab for later use
New-LabRecipe -Name MySuperLab -DeployRole DscPull,CI_CD