Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
copy-running-certs: | |
kubectl get secret webhook-server-cert -n psc-system -o json | sed 's/ca.crt/cacrt/; s/tls.crt/tlscrt/; s/tls.key/tlskey/' > secrets.json | |
mkdir -p ./.running-keys | |
jq -r .data.cacrt < secrets.json | base64 --decode > ./.running-keys/ca.crt | |
jq -r .data.tlscrt < secrets.json | base64 --decode > ./.running-keys/tls.crt | |
jq -r .data.tlskey < secrets.json | base64 --decode > ./.running-keys/tls.key | |
mkdir -p /tmp/k8s-webhook-server/serving-certs | |
cp ./.running-keys/* /tmp/k8s-webhook-server/serving-certs/ | |
rm secrets.json | |
param( | |
[string][Parameter(Mandatory=$true)]$InputFile, | |
[string][Parameter(Mandatory=$true)]$OutputFile, | |
[int]$SampleRate = 44100, | |
[string]$BitRate = "160k" | |
) | |
$ErrorActionPreference = "Stop" | |
$InputFile = [System.IO.Path]::Combine((Get-Location), $InputFile) |
FROM microsoft/dotnet:2.0-sdk as builder | |
RUN mkdir -p /root/src/app/aspnetcoreapp | |
WORKDIR /root/src/app/aspnetcoreapp | |
#copy just the project file over | |
# this prevents additional extraneous restores | |
# and allows us to resuse the intermediate layer | |
# This only happens again if we change the csproj. | |
# This means WAY faster builds! |
This script is modeled after tee
(see [man tee
][2]) and works on Linux, macOS, Cygwin, WSL/WSL2
It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.
This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]
#r "Newtonsoft.Json" | |
#r "Microsoft.Rest.ClientRuntime.dll" | |
#r "Microsoft.Bot.Connector.Utilities.dll" | |
#r "Microsoft.Bot.Connector.dll" | |
using System.Net; | |
using Microsoft.Bot.Connector; | |
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) | |
{ | |
log.Verbose($"C# HTTP trigger function processed a request. RequestUri={req.RequestUri}"); |
#Open Azure Powershell | |
#Import your Azure Subscription | |
Add-AzureAccount | |
#Get the list of Azure Subscriptions | |
Get-AzureSubscription | |
#Select the azure Subscription of the Virtual Machines | |
Select-AzureSubscription "[SubscriptionName]" |