Skip to content

Instantly share code, notes, and snippets.

View ephos's full-sized avatar

Rob ephos

View GitHub Profile
Describe 'Module Structure and Syntax' {
BeforeAll {
$modulePath = Get-Item -Path $PSScriptRoot\..\src
$moduleName = (Get-Item -Path "$modulePath\*.psd1").BaseName
$moduleManifest = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1"
$manifest = Test-ModuleManifest -Path $moduleManifest -ErrorAction Stop -WarningAction SilentlyContinue
}
Context 'Module Manifest' {
@ephos
ephos / Manifest.Tests.ps1
Created September 27, 2023 00:14
Pester_Tests
Describe 'Module Structure and Syntax' {
BeforeDiscovery {
$modulePath = Get-Item -Path $PSScriptRoot\..\src
$functionsPublicPath = Join-Path -Path $modulePath -ChildPath 'Functions\Public'
$functionsPrivatePath = Join-Path -Path $modulePath -ChildPath 'Functions\Private'
$functionsPublic = Get-ChildItem -Path $functionsPublicPath -Filter *.ps1
if (Test-Path $functionsPrivatePath) {
@ephos
ephos / psm1_func_splitter.ps1
Created September 7, 2023 16:48
Uses AST to split out functions from a mono-psm1
$psm1 = Get-Item -Path "./*.psm1"
# Parse the content to produce the AST
$ast = [System.Management.Automation.Language.Parser]::ParseFile($psm1, [ref]$null, [ref]$null)
# Find all function definitions
$functions = $ast.FindAll({
param($node)
$node -is [System.Management.Automation.Language.FunctionDefinitionAst]
@ephos
ephos / resume.json
Last active July 19, 2025 16:56
Resume
{
"basics": {
"name": "Rob Pleau",
"label": "DevSecOps Engineer / Platform Engineer",
"image": "https://avatars.githubusercontent.com/u/14333618?v=4",
"email": "career@rjpleau.com",
"url": "https://www.bobbycodes.io",
"summary": "Security-oriented DevSecOps and Platform Engineer with over 17 years of experience delivering robust, scalable, and secure cloud-native solutions. Passionate about automation, process optimization, and knowledge sharing. Proven expertise in designing, implementing, and managing complex containerized and cloud infrastructures across AWS, Azure, and hybrid environments. Skilled in building CI/CD pipelines, writing Infrastructure as Code (IaC), and developing CLI tools and automation scripts to streamline developer workflows and enhance security posture. Recognized for bridging the gap between development, operations, and security with a pragmatic, engineer-first mindset.",
"location": {
"city": "Milford",
trigger:
paths:
exclude:
- azure-pipelines.yml
- .gitignore
- LICENSE
- ReadMe.md
- images/*
branches:
@ephos
ephos / bobbybologna.omp.json
Last active July 29, 2025 13:57
PowerShell_Profile
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "\uf007 {{.UserName}} | \uea7a {{.HostName}} | \uf489 {{.Shell}} | \ueaf7 {{.PWD}} | \ueb58 {{.Code}}",
"version": 2,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
@ephos
ephos / module.tests.ps1
Last active August 20, 2020 15:57
Module Tests
Describe -Name 'Module Structure' {
BeforeAll {
# Test setup - Pester v5 Setup Syntax
$moduleRoot = (Get-Item -Path $PSCommandPath).Directory.Parent.FullName
$modulePath = Join-Path -Path $moduleRoot -ChildPath \src\
$moduleName = (Get-Item -Path "$modulePath\*.psd1").BaseName
$moduleManifest = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1"
$manifest = Test-ModuleManifest -Path $moduleManifest -ErrorAction Stop -WarningAction SilentlyContinue
function Test-ComputerSecureChannelPSSession
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Low')]
param
(
[Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, Position = 0)]
[ValidateNotNullOrEmpty()]
[string]$ComputerName,
[Parameter(Mandatory = $false, Position = 1)]
@ephos
ephos / ffmpegconcat.ps1
Created August 30, 2018 00:09
ffmpeg concat
Get-ChildItem C:\Users\ephos\Videos\ -Filter *.mp4 | Sort-Object -Property Name | Select-Object -Property @{N='Custom';E={"file '$($_.FullName)'"}} | Select-Object -ExpandProperty Custom | Out-File -FilePath C:\Users\ephos\Videos\list.txt -Force
C:\Users\ephos\Desktop\ffmpeg-4.0-win64-static\bin\ffmpeg.exe -f concat -safe 0 -i 'list.txt' -c copy output.mp4
2017-12-04T15:51:10.337-0500 [DEBUG] plugin.terraform-provider-vsphere_v1.0.1_x4.exe: 2017/12/04 15:51:10 [DEBUG] Looking for VM or template by name/path "Server2012_R2_Template"
2017-12-04T15:51:10.348-0500 [DEBUG] plugin.terraform-provider-vsphere_v1.0.1_x4.exe: 2017/12/04 15:51:10 [DEBUG] Datacenter for VM/template search: /MyDatacenter
2017-12-04T15:51:10.749-0500 [DEBUG] plugin.terraform-provider-vsphere_v1.0.1_x4.exe: 2017/12/04 15:51:10 [DEBUG] Fetching properties for VM "/MyDatacenter/Server2012_R2_Template"
2017-12-04T15:51:10.760-0500 [DEBUG] plugin.terraform-provider-vsphere_v1.0.1_x4.exe: 2017/12/04 15:51:10 [DEBUG] ReadSCSIBusState: SCSI controller layout for first 1 controllers: lsilogic-sas-1000
2017-12-04T15:51:10.760-0500 [DEBUG] plugin.terraform-provider-vsphere_v1.0.1_x4.exe: 2017/12/04 15:51:10 [DEBUG] ReadDiskSizes: Fetching disk sizes for disks across 1 SCSI controllers
2017-12-04T15:51:10.760-0500 [DEBUG] plugin.terraform-provider-vsphere_v1.0.1_x4.exe: 2017/12/04 15:51:10 [DEBUG] DiskR