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 FileSelector { | |
# Define a function that allows the user to select files. | |
# Credit: https://4sysops.com/archives/how-to-create-an-open-file-folder-dialog-box-with-powershell/ | |
$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{ | |
InitialDirectory = [Environment]::GetFolderPath('Desktop') | |
} | |
$null = $FileBrowser.ShowDialog() | |
return $FileBrowser | |
} |
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
$a=@(1,2,3,4,5,8) | |
$b=@(1,2,3,4,5,6,9,"ten") | |
$c = $b | where { -not ($a -contains $_) } | |
Write-Host $c |
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
# Set path to game: | |
$game = "X:\Games\Warzone\Call of Duty Modern Warfare\ModernWarfare.exe" | |
Write-Host "Please start the game if not already running." -ForegroundColor Yellow | |
Write-Host "$(Get-Date)`tChecking for game process..." | |
Do { | |
$process = Get-Process -Name "ModernWarfare" -ErrorAction SilentlyContinue | |
Start-Sleep 5 |
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
const fs = require('fs'); | |
import path from 'path'; | |
const AWS = require('aws-sdk'); | |
const BUCKET_NAME = 'my-bucket'; | |
const awsConfig = new AWS.Config({ | |
accessKeyId: process.env['SCALEWAY_ACCESS_KEY'], | |
secretAccessKey: process.env['SCALEWAY_SECRET_KEY'], | |
region: 'fr-par', // Not actually required to work | |
//s3BucketEndpoint: true, // Required if configuring for a single bucket endpoint like https://my-bucket.s3.fr-par.scw.cloud |
OlderNewer