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
#!/bin/bash | |
usage() | |
{ | |
# Display Help | |
echo "*********************************************************************************************************************************************************" | |
echo " MacOS Application Notarization Script" | |
echo "*********************************************************************************************************************************************************" | |
echo |
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 Convert-PesterResultToJUnitXml { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
$PesterResult | |
) | |
$junit = '<?xml version="1.0" encoding="utf-8"?>' | |
$junit += "`n" + '<testsuites name="Pester" tests="{0}" failures="{1}" disabled="{2}" time="{3}">' -f @( | |
$PesterResult.TotalCount, |
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
$Folder = 'C:\path\to\media\'; | |
$sec = 0 | |
$min = 0 | |
$hr = 0 | |
$len = @() | |
Get-ChildItem -Recurse | ForEach-Object { | |
$File = $_.Name; |
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
from typing import List, Iterator | |
import os | |
import urllib.request | |
import json | |
from dataclasses import dataclass | |
import argparse | |
PRODUCT_URL = "https://bad-dragon.com/api/products" | |
SAVE_DIR = "models" |
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
# Generate a random Alphanumeric string | |
Function Get-RandomAlphanumericString { | |
[CmdletBinding()] | |
Param ( | |
[int] $length = 8 | |
) | |
Begin{ |
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()] | |
[outputtype("moduleInfo")] | |
Param( | |
[Parameter(Position = 0, HelpMessage = "Enter a module name or names. Wildcards are allowed.")] | |
[ValidateNotNullorEmpty()] | |
[string[]]$Name = "*" | |
) | |
Write-Verbose "Getting installed modules" | |
Try { |
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
$ProVersion = "v2.8" | |
<# | |
PowerShell Profile $ProVersion | |
Author: Jeremy DeWitt aka JBear | |
Update Notes: | |
Version 2.8: | |
- Added Windows 7 and MSOffice 2013 activation functions to repo. |
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
$today = Get-Date | |
$todayFormatted = $today.Year.ToString() + "-" + $today.Month.ToString("D2") + "-" + $today.Day.ToString("D2") | |
$Market = "en-AU" | |
$Resolution = "1920x1200" | |
$ImageFileName = "wallpaper-" + $todayFormatted + ".jpg" | |
$DownloadDirectory = "$env:USERPROFILE\Pictures\Bing Wallpaper" | |
$BingImageFullPath = "$($DownloadDirectory)\$($ImageFileName)" | |
if ((Test-Path $DownloadDirectory) -ne $True) { |
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 4.0 -Modules DnsServer | |
<# | |
.Synopsis | |
Copy Unbound DNS records from pfSense to MS DNS server | |
.DESCRIPTION | |
Facilitates movement from Unbound on pfSense to MS DNS services. | |
Function recreates A and CNAME records from pfSense backup in a MS Server DNS zone. | |
*Tested with pfSense version 2.3.2 and Server 2016 |
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 | |
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager | |
.DESCRIPTION | |
This module will return a [PSCredential] object from a credential stored in Windows Credential Manager. The | |
Get-StoredCredential function can only access Generic Credentials. | |
Alias: GSC |
NewerOlder