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
| Start-Transcript -Path "$env:TEMP\docker-plugin-install.log" | |
| $pluginDir = "$env:USERPROFILE\.docker\cli-plugins" | |
| New-Item -ItemType Directory -Force -Path $pluginDir | |
| try { | |
| # Compose | |
| Invoke-WebRequest -Uri "https://github.com/docker/compose/releases/latest/download/docker-compose-windows-x86_64.exe" -OutFile "$pluginDir\docker-compose.exe" | |
| # Scout |
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
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "secondary_prompt": { | |
| "template": "❯❯ ", | |
| "foreground": "#16c60c" | |
| }, | |
| "transient_prompt": { | |
| "template": "❯ ", | |
| "foreground": "#16c60c" | |
| }, |
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
| param( | |
| [string]$DomainsFile = "dns.txt", | |
| [int]$TimeoutMs = 10000, | |
| [switch]$SkipDomainKeyRecords | |
| ) | |
| # Configure SSL/TLS settings | |
| [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} | |
| [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 -bor [System.Net.SecurityProtocolType]::Tls13 |
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
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "secondary_prompt": { | |
| "template": "❯❯ ", | |
| "foreground": "#16c60c" | |
| }, | |
| "transient_prompt": { | |
| "template": "❯ ", | |
| "foreground": "#16c60c" | |
| }, |
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
| package com.example.keycloak.aws; | |
| import com.fasterxml.jackson.databind.JsonNode; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import org.keycloak.models.KeycloakSession; | |
| import software.amazon.awssdk.regions.Region; | |
| import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient; | |
| import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest; | |
| import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse; |
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
| $totalVcpus = 0 | |
| # Get all ECS clusters | |
| $clusters = aws ecs list-clusters --query 'clusterArns[]' --output text | |
| foreach ($cluster in $clusters -split "`t") { | |
| if ([string]::IsNullOrWhiteSpace($cluster)) { continue } | |
| # Get all services in the cluster | |
| $services = aws ecs list-services --cluster $cluster --query 'serviceArns[]' --output text |
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 -RunAsAdministrator | |
| $logFile = "$env:USERPROFILE\Desktop\WindowsMaintenance_$(Get-Date -Format 'yyyyMMdd_HHmmss').log" | |
| Start-Transcript -Path $logFile -Append | |
| "Starting Windows maintenance routine..." | |
| if ($wslFeature.State -eq 'Enabled') { | |
| "Shutting down WSL..." | |
| wsl --shutdown |
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
| $user = "your user/org" | |
| $repo = "repo" | |
| (gh api repos/$user/$repo/actions/runs | ConvertFrom-Json).workflow_runs | | |
| %{ $_.id } | | |
| %{ gh api repos/$user/$repo/actions/runs/$_ -X DELETE } | |
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
| $Env:Path -Split ";" | ForEach-Object { if ($false -eq (Test-Path $_)) { Write-Output $_} } |
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
| // https://www.facebook.com/pages/?category=liked&ref=bookmarks | |
| // Scroll down to load all the items | |
| [...document.querySelectorAll("[aria-label=Liked]")].forEach(e => e.click()) |
NewerOlder