Get all pod names in a namespace:
kubectl get pods -n mynamespace -o jsonpath='{.items..metadata.name}'
Delete all running pods in a namespace:
# Tool lists: | |
# https://github.com/aspnet/AspNetCore/blob/master/src/Tools/ | |
# https://github.com/natemcmaster/dotnet-tools | |
$tools = @( | |
'dotnet-counters', | |
'dotnet-depends', | |
'dotnet-dump', | |
'dotnet-format', | |
'dotnet-guid', | |
'dotnet-outdated-tool', |
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common \ | |
scons \ |
This allows you to use the Windows Task Scheduler to send an email via PowerShell script when a Windows Backup succeeds or fails.
backup-failed-filter.xml
as the filter. This catches all the backup failure events and will trigger the script. Attach that to the Send-BackupFail.ps1
.Send-BackupSuccess.ps1
to that.
<# | |
.Synopsis | |
Downloads an M3U8 playlist and the subsequent TS files, ready for combining. | |
.DESCRIPTION | |
Using the headers from an authenticated session with a video provider, download the | |
contents of a playlist and prepare the TS files in the playlist for merging. | |
Assuming you have your headers exported as JSON like this... | |
{ |
<# | |
.Synopsis | |
Gets all the entities from a Kubernetes namespace; or, alternatively, the set of all non-namespaced items. | |
.PARAMETER Namespace | |
The namespace from which entities should be retrieved. Omit this parameter to retrieve non-namespaced items. | |
.DESCRIPTION | |
Gets a list of all the API resources available in the Kubernetes cluster that are namespaced (or non-namespaced, | |
as the case may be.) Once that list has been retrieved, removes the 'events' objects if there are any (these get | |
too long and numerous to be valuable), then gets everything as requested. |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Most boxes use 'vagrant' as the username | |
# but recent Ubuntu builds use 'ubuntu'. | |
$username = "vagrant" | |
# Check for required plugins. | |
# Vagrant 2.1.3, 2.1.4 plugin checks are broken. | |
# https://github.com/hashicorp/vagrant/issues/10161 |
@echo off | |
rem Fork of https://github.com/faniereynders/dotnet-sdk-helpers/blob/master/dotnet-sdk.cmd to handle errors in downloads. | |
SET dotnet_releases_url=https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json | |
SET script_path=%~dp0 | |
SET tools_path=%~dp0 | |
rem FIX: Downloading to temp path to avoid missing directories. | |
SET download_path=%TEMP%\ |
Get-ChildItem -Path C:\path\to\project\root -Filter *.csproj -Recurse | | |
Select-Xml -Namespace @{msb="http://schemas.microsoft.com/developer/msbuild/2003"} -XPath "//msb:TargetFrameworkVersion" | | |
Select-Object -Property @{Name="TargetFrameworkVersion"; Expression={$_.Node.InnerXml}} | | |
Select-Object -ExpandProperty TargetFrameworkVersion | | |
Group-Object |
Values for the transpose
parameter:
To rotate 180 degrees, use "transpose=2,transpose=2"
Using -codec:a copy
will simply copy the audio instead of reencoding it.