Unofficial AKS Cheat Sheet
Official AKS FAQ is here
| # Usage: create-sshkey KEYNAME PASSPHRASE [COMMENT] | |
| # KEYNAME = The file name used for the key. | |
| # PASSPHRASE = The pass phrase to be used. If you wish to not use a passphrase just use a blank string (i.e. "") | |
| # COMMENT = Optional Comment. If skipped the KEYNAME will be used. | |
| # | |
| # Example: create-sshkey my_secret.key "This is my secret passphrase" "An example key." | |
| function create-sshkey() { | |
| KEYNAME=$1 | |
| PASSPHRASE=$2 | |
| COMMENT=${3:-$KEYNAME} |
| /* characteristic.js | |
| * A simple custom BLE peripheral characteristic for use with Node.js and bleno. | |
| * This characteristic supports read, write, and notify properties. | |
| * Julian Hays - 10/14/19 | |
| */ | |
| var util = require('util'); | |
| var bleno = require('bleno-mac'); //or 'bleno-mac' if you are using that | |
| var BlenoCharacteristic = bleno.Characteristic; |
| #!/usr/bin/env python3 | |
| import subprocess | |
| import json | |
| import os | |
| from pathlib import Path | |
| import requests | |
| from requests.compat import urljoin |
| const bleno = require("@abandonware/bleno"); | |
| const CALCULATOR_SERVICE_UUID = "00010000-89BD-43C8-9231-40F6E305F96D"; | |
| const ARGUMENT_1_UUID = "00010001-89BD-43C8-9231-40F6E305F96D"; | |
| const ARGUMENT_2_UUID = "00010002-89BD-43C8-9231-40F6E305F96D"; | |
| const RESULT_UUID = "00010010-89BD-43C8-9231-40F6E305F96D"; | |
| class ArgumentCharacteristic extends bleno.Characteristic { | |
| constructor(uuid, name) { | |
| super({ |
| # @name auth | |
| POST https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token HTTP/1.1 | |
| Content-type: application/x-www-form-urlencoded | |
| grant_type=client_credentials | |
| &client_id={{clientId}} | |
| &client_secret={{clientSecret}} | |
| &scope={{scope}} |
| export GITHUB_USER=magickatt | |
| export GITHUB_TOKEN=secret | |
| export GITHUB_REPOSITORY=magickatt/ContainerisingLegacyApplicationsTalk | |
| git clone https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} |
Unofficial AKS Cheat Sheet
Official AKS FAQ is here
| Function Out-GridViewCode{ | |
| <# | |
| .SYNOPSIS | |
| Sends output to an interactive table in a separate window. With extended support to display Out-GridView as main window when using VS Code | |
| .DESCRIPTION | |
| The Out-GridView cmdlet sends the output from a command to a grid view window where the output is displayed in an interactive table. However, when you use VS Code the window appears in the background. Running this wrapper will bring the window to the front. | |
| Parameters remain the same as the orginal Out-GridView | |
| import time | |
| import board | |
| import digitalio | |
| from adafruit_hid.mouse import Mouse | |
| print("Hello!") | |
| led = digitalio.DigitalInOut(board.LED1) | |
| led.direction = digitalio.Direction.OUTPUT | |
| led.value = False |
| #!/bin/bash | |
| if [ "$#" -ne 2 ]; then | |
| echo "Usage: $0 fqdn email" | |
| exit 1 | |
| fi | |
| docker run -p 80:80 -p 443:443 -v /etc/letsencrypt:/etc/letsencrypt certbot/certbot certonly --standalone --agree-tos --reinstall --force-renewal --non-interactive --text --rsa-key-size 4096 --email $2 --domains $1 | |
| mkdir -p /root/.minio/certs | |
| cp /etc/letsencrypt/live/$1/fullchain.pem /root/.minio/certs/public.crt |