Skip to content

Instantly share code, notes, and snippets.

View moverperfect's full-sized avatar

Jack Moorhouse moverperfect

  • London
  • 17:48 (UTC +01:00)
View GitHub Profile
@moverperfect
moverperfect / Connection_Manager.ps1
Last active May 2, 2023 13:31
A PowerShell script to create and manage RDP and SSH connections to Windows and Linux VMs.
<#
.SYNOPSIS
Connection_Manager.ps1 - A PowerShell script to create and manage RDP and SSH connections to Windows and Linux VMs.
.DESCRIPTION
This script manages connections to Windows and Linux VMs using RDP and SSH, respectively. It takes a server name and connection type as input or prompts the user for them.
For RDP connections, the script generates a temporary RDP file and initiates the RDP session with the provided server name and properties.
For SSH connections, the script checks if the user is logged into Azure CLI and connects using "az ssh vm" command.
.PARAMETER ServerName
@moverperfect
moverperfect / moverperfect.tokyo.omp.json
Created June 29, 2023 08:33
Customised Tokyo Oh My Posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#7eb8da",
"style": "plain",
"template": "\u250f[<#ffffff>\ueb99</> {{ if .SSHSession }} {{ end }}{{ .UserName }} from <#ffffff>\uf108</> {{ .HostName }}]",
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transaction Manager</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>