Skip to content

Instantly share code, notes, and snippets.

View thedavecarroll's full-sized avatar
🧑‍💻
Clever Status

Dave Carroll thedavecarroll

🧑‍💻
Clever Status
View GitHub Profile
@thedavecarroll
thedavecarroll / Get-GitLog.ps1
Last active December 19, 2019 18:13
A PowerShell function for reading the git log of a local repository which is returned as an array of PSCustomObjects.
function Get-GitLog {
[CmdLetBinding(DefaultParameterSetName='Default')]
param (
[Parameter(ParameterSetName='Default',ValueFromPipeline,Mandatory)]
[Parameter(ParameterSetName='SourceTarget',ValueFromPipeline,Mandatory)]
[ValidateScript({Resolve-Path -Path $_ | Test-Path})]
[string]$GitFolder,
[Parameter(ParameterSetName='SourceTarget',Mandatory)]
@thedavecarroll
thedavecarroll / WindowsForms.psm1
Last active July 4, 2022 09:24
WindowsForms ad hoc module and an example script
# ----------------------------------------------------------------------------------------------------------------------
# Functions required to create PowerShell GUI using System.Windows.Forms
# ----------------------------------------------------------------------------------------------------------------------
#region load assemblies
try {
[Void][reflection.assembly]::loadwithpartialname('System.Windows.Forms')
[Void][reflection.assembly]::loadwithpartialname('System.Drawing')
}
catch {
@thedavecarroll
thedavecarroll / Get-Sysinternals.ps1
Last active September 5, 2018 02:03
Download Updated Sysinternals Suite Tools
function Get-Sysinternals {
[CmdLetBinding()]
param(
[string]$InstallLocation
)
if ($InstallLocation) {
Get-ChildItem -Path $InstallLocation | Select-Object -Property Name,Length,LastWriteTime,@{l='Updated';e={Get-Date $_.LastWriteTime -Format d}}
} else {
@thedavecarroll
thedavecarroll / cibuild
Created August 27, 2018 03:23
CI Build Script
#!/usr/bin/env bash
set -e # halt script on error
echo
echo "------------------------------------------------------------------------------------------------------------------------"
if [ "$TRAVIS_PULL_REQUEST" != "false" -a "$TRAVIS_BRANCH" == "comments" ]; then
echo
echo "Building site for pull request for $TRAVIS_BRANCH..."
bundle exec jekyll build --config _config.yml --source . --destination ./docs