This file contains hidden or 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
// ==UserScript== | |
// @name lab suite | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Suite of lab helpers | |
// @author You | |
// @match https://*.cloudacademy.com/* | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.6.0.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js |
This file contains hidden or 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
// ==UserScript== | |
// @name Admin link | |
// @namespace http://tampermonkey.net/ | |
// @version 0.7 | |
// @description Provide links to open in admin | |
// @author You | |
// @match https://*.cloudacademy.com/* | |
// @match https://*.app.qa.com/* | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.6.0.min.js |
This file contains hidden or 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
// ==UserScript== | |
// @name Lab Debug On | |
// @namespace http://tampermonkey.net/ | |
// @version 0.5 | |
// @description Lab Debug On | |
// @author You | |
// @match https://*.cloudacademy.com/* | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.6.0.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js |
This file contains hidden or 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
-----BEGIN PRIVATE KEY----- | |
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBL2soKeIWpxf+ | |
ywATxUqdAnOB4OnNhNla1hWkuawQtgO8cfstsGMInOuXMPPCQ+WxSLjAo2goQDYK | |
wmYoYmgbpUyx87jRlnqMAIlz+jIJLjnpRLwV8Rkw8hfo6WJEe7c+5wwlLj5cNHnB | |
XTQtMDaf1Mt9hL9XhLjGgzfEWDcBx3zPVB1s/euX94CV3qpU032a63JNFY7F6L2i | |
AGOMFt8yQ2MszKF7B5mFTdZbzXQT9HASDWcX49OKG6RN5HNHDK6y44ROMz1NQPtX | |
neSTe3s31mfiGIAnUVbqysYvH17O1uRGzS1uM0873hlS2r4KJ79tXgNeSR6f7PCf | |
2bsJFOyPAgMBAAECggEBAJtkdSF9byshhR+iUpGUpQveqOLT870pG10Bz68M2ucm | |
QaMXXB/IPiDzeF3JNooQ63XLNTFfP60A2XeWH25kmbGDKUoK7aNJE5IB7I6ptg3E | |
bTjB3TkZElZYpfrnn+/OQ/wJBa/ynp60ZyuuuQWQPqAaHwT7/p17WNX1Pqpk+vom |
This file contains hidden or 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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"virtualMachineName": { | |
"type": "string", | |
"defaultValue": "ca-lab-vm" | |
}, | |
"virtualMachineSize": { | |
"type": "string", |
This file contains hidden or 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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"virtualMachineName": { | |
"type": "string", | |
"defaultValue": "ca-lab-vm" | |
}, | |
"virtualMachineSize": { | |
"type": "string", |
This file contains hidden or 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
#Provide the subscription Id where managed disk is created | |
# subscriptionId=yourSubscriptionId # omit for use in Azure Cloud Shell | |
# az account set --subscription $subscriptionId | |
#Provide the name of your resource group where managed disk is created | |
resourceGroupName=QACA | |
#Provide the managed disk name | |
diskName=ca-lab-vm_OsDisk_1_b5b39d9313ec4ce3aa8ace3889dcce9b |
This file contains hidden or 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
import boto3 | |
import botocore | |
import time | |
def handler(event=None, context=None): | |
client = boto3.client('ssm') | |
instance_id = 'i-07362a00952fca213' # hard-code for example | |
response = client.send_command( |
This file contains hidden or 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
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | awk '{print $2}' | grep -v ^$ | while read x; do aws logs delete-log-group --log-group-name $x; done |
This file contains hidden or 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
# Must run on a Windows Server with Azure File Sync Agent and Azure PowerShell module installed | |
function Login-Azure { | |
param ( | |
[string]$username, | |
[string]$password # Use [secureString] outside of secure environments | |
) | |
# Convert password to secure string (required for creating login credential) | |
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force |