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
--- | |
version: "2" | |
services: | |
emby: | |
image: linuxserver/emby | |
container_name: emby | |
environment: | |
- PUID=998 | |
- PGID=100 | |
- TZ=America/Denver |
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
using namespace Microsoft.Azure.Commands.Insights.OutputClasses | |
$ErrorActionPreference = 'Stop' | |
[PSEventDataNoDetails]$lastEvent = Get-AzActivityLog -MaxRecord 1 -StartTime (Get-Date).AddDays(-89) -WarningAction SilentlyContinue | |
if (-not $lastEvent) {throw [NotImplementedException]'You have an empty activity log!'} | |
while ($true) { | |
Write-Verbose "Waiting for new events..." | |
while (-not $newEvent) { | |
Write-Verbose "No new event detected after $($lastEvent.EventTimestamp.ToLocalTime()), waiting for changes..." |
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
<# | |
.SYNOPSIS | |
Internalize package icons for internalized packages | |
.EXAMPLE | |
$params = @{ | |
InternalizerDownloadPath = 'C:\internalized\download\' | |
IconRepository = 'http://nexus.fabrikam.com:8081/repository/icons/' | |
PackageRepository = 'http://nexus.fabrikam.com:8081/repository/choco/' | |
} |
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
# Check for Homebrew, | |
# Install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Update homebrew recipes | |
echo "Updating homebrew..." | |
brew update |
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
version: '2' | |
volumes: | |
nextcloud: | |
db: | |
services: | |
db: | |
image: yobasystems/alpine-mariadb:latest | |
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW |
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
// Query for Microsoft Defender 365 - exploring devicenetwork info. Identify Wi-Fi hotspots, DHCP servers, DNS servers etc. | |
DeviceNetworkInfo | |
| where Timestamp > ago (30d) | |
// | where DeviceName contains "ADD YOUR COMPUTERNAME HERE" | |
| where NetworkAdapterStatus contains "Up" | |
| extend NetworkName = tostring(parse_json(ConnectedNetworks)[0].Name) | |
| extend Description = tostring(parse_json(ConnectedNetworks)[0].Description) | |
| extend IsConnectedToInternet = tostring(parse_json(ConnectedNetworks)[0].IsConnectedToInternet) | |
| extend Category = tostring(parse_json(ConnectedNetworks)[0].Category) | |
| extend Dns1 = tostring(parse_json(DnsAddresses)[0]) |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": | |
[ | |
{ | |
"command": | |
{ | |
"action": "copy", | |
"singleLine": false | |
}, |
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
<# | |
PowerShell FizzBuzz Test | |
.ASSIGNMENT | |
Write a program that prints the numbers from 1 to 100. | |
But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. | |
For numbers which are multiples of both three and five print “FizzBuzz”. | |
.SOLUTION | |
Author: David C. Bird |
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
$parameters = @{ | |
Key = 'F7' | |
BriefDescription = 'ShowMatchingHistoryOcgv' | |
LongDescription = 'Show Matching History using Out-ConsoleGridView' | |
ScriptBlock = { | |
param($key, $arg) # The arguments are ignored in this example | |
$line = $null | |
$cursor = $null | |
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$line, [ref]$cursor) | |
$history = [Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems().CommandLine | Select-Object -Unique |
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 Get-Netstat | |
{ | |
$netstat = Get-Command -Name 'netstat' -ErrorAction SilentlyContinue | |
if (-Not $netstat) { | |
Write-Warning "netstat command not available" | |
return ,@() | |
} |