AKS preview features are available on a self-service, opt-in basis. Previews are provided "as is" and "as available," and they're excluded from the service-level agreements and limited warranty. AKS previews are partially covered by customer support on a best-effort basis. As such, these features aren't meant for production use. For more information, see the following support articles:
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 Write-CustomLog { | |
param([string]$Message) | |
$callerInfo = (Get-PSCallStack)[1] | |
$scriptName = Split-Path -Leaf $callerInfo.ScriptName | |
$lineNumber = $callerInfo.ScriptLineNumber | |
$functionName = $callerInfo.FunctionName | |
$logEntry = "{0:yyyy-MM-dd HH:mm:ss} - {1}:{2} - {3} - {4}" -f ` | |
(Get-Date), $scriptName, $lineNumber, $functionName, $Message |
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
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"time" |
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
param( | |
[parameter(Mandatory)] | |
$user, | |
[System.Management.Automation.SwitchParameter] | |
$delete, | |
[string] | |
$yourUsername, |
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
return "This is a demo script file." | |
# Find Me: https://jdhitsolutions.github.io | |
# Any one can learn syntax and mechanics. | |
# Let's focus on the squishy bits - what you should write | |
# and what not to write | |
#region Essential rules |
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
#!/usr/bin/env python3 | |
import usb.core | |
import struct | |
from collections import namedtuple | |
APPLE_VID = 0x05ac | |
Target = namedtuple("Target", ["vid", "pid", "name", "model", "total_size"]) |
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
#!/usr/bin/env pwsh | |
param( | |
[Parameter(Position = 0, Mandatory = $true)] | |
[string] $ZipFilePath, | |
[Parameter(Position = 1, Mandatory = $true)] | |
[string] $FilePattern, | |
[Parameter(Position = 2, Mandatory = $true)] |
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
#! /usr/bin/env node | |
import fs from 'fs'; | |
import { promisify } from 'util'; | |
import path from 'path'; | |
import { spawn } from 'child_process'; | |
const fsExists = promisify(fs.exists); | |
if (!process.env.GITHUB_TOKEN) throw new Error("process.env.GITHUB_TOKEN is required"); | |
if (!process.env.GITHUB_USER) throw new Error("process.env.GITHUB_USER is required"); |
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
# Copyright: (c) 2024, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function Test-Tls { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[string] | |
$HostName, |
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
# explicitly define the interface | |
__all__ = ["minimal_dir"] | |
from functools import cache | |
@cache | |
def get_stdlib_packages(): | |
""" Get list that should include all stdlib package/module names. | |
Not perfect. Has false positives. |
NewerOlder