$parms = @{
Path = "C:\windows\system32"
Recurse = $true
ErrorAction = "SilentlyContinue"
}
Measure-Benchmark -RepeatCount 25 -Technique @{
ForEachObject = {
Get-ChildItem @parms | ForEach-Object -Process {
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
var { chromium } = require('playwright'); | |
(async function () { | |
var themeparam = process.argv[2]; | |
var path = require('path'); | |
var fs = require('fs'); | |
var directoryPath = path.join(__dirname, 'themes'); | |
var file = path.join(directoryPath, `${themeparam}.json`); | |
console.log("processing " + file); |
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
on: push | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres_password | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
DATABASE_URL: postgres://postgres:postgres_password@localhost:5432/postgres | |
jobs: | |
process-json: | |
runs-on: ubuntu-latest |
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
on: push | |
jobs: | |
download-file: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* |
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
<# | |
Combo commands that are powerful and fun | |
1. Encrypting | |
2. Testing your backups | |
3. Disaster Recovery | |
#> | |
# Show SSMS |
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
function Test-DarkColor { | |
<# | |
.SYNOPSIS | |
Tests an rgb or hex value to see if it's considered light or dark | |
.PARAMETER Color | |
The color to test in Hex or RGB | |
.NOTES | |
Thanks to: |
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
break | |
<# | |
01. Find instances | |
02. Connect to instances | |
03. Check backups | |
04. Check disk space | |
05. Perform backups | |
06. Check for corruption | |
07. Install maintenance scripts | |
08. Export all settings for DR |
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
function Test-FileHash { | |
<# | |
.Synopsis | |
This is a simple file hash comparison tool that writes to Windows Events when changes are detected | |
.Description | |
This is a simple file hash comparison tool that writes to Windows Events when changes are detected | |
.PARAMETER FilePath | |
The path to the file to hash and compare |
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
name: github pages | |
on: | |
push: | |
branches: | |
- blog # Set a branch to deploy | |
pull_request: | |
jobs: | |
deploy: |
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
function Convert-Pfx { | |
<# | |
.SYNOPSIS | |
Converts PFX to .cer and .key | |
.DESCRIPTION | |
Converts PFX to .cer and .key | |
Requires openssl | |