Skip to content

Instantly share code, notes, and snippets.

View midacts's full-sized avatar
🗝️
It's a secret to everybody

John McCarthy midacts

🗝️
It's a secret to everybody
View GitHub Profile
@midacts
midacts / gcp_cloud_func_test.sh
Last active November 21, 2022 21:43
GCP Cloud Function Invocation by Service Account
###############
## VARIABLES ##
###############
SA='my-service-account'
PROJECT_ID='my-project-id'
FUNCTION_URL='my-func-url'
# Create the service account
gcloud iam service-accounts create $SA --project $PROJECT_ID
@midacts
midacts / settings.json
Created March 4, 2022 20:05
VS Code User Settings
{
"files.eol": "\n",
"files.encoding": "utf8",
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.detectIndentation": true,
"editor.renderWhitespace": "all",
"editor.rulers": [80,120],
"window.zoomLevel": 1,
"workbench.colorCustomizations": {
"""Model for aircraft flights"""
class Flight:
"""A flight with a particular passenger aircraft."""
def __init__(self, number, aircraft):
if not number[:2].isalpha():
raise ValueError("No airline code in '{}'".format(number))

Hints

  • 04/3/2019 7:00PM EST
    • "This riddle requires you to know a little bit about me."
  • 04/3/2019 7:03OM EST
    • "Riddle 4 requires knowledge of me."
    • "This story is about me."
  • 04/3/2019 7:04PM EST
    • "You will need to ask people who are close to me."
  • "Got siblings?"
@midacts
midacts / MagicLevelCalculator.txt
Last active November 23, 2018 19:35
Tibia Magic Level Calculator - 610 ult mana per wand and + 10% from Advanced Exercise Dummy
## WITH 10% bonus from using Advanced Training Dummies
Level: 1 Mana: 1,60 Wands: 0.004 Days: 0.00 day Hours: 0.00 hours Gold: 262,50 TC: 2 USD: 0.80
Level: 2 Mana: 1,76 Wands: 0.005 Days: 0.00 day Hours: 0.00 hours Gold: 262,50 TC: 2 USD: 0.80
Level: 3 Mana: 1,93 Wands: 0.005 Days: 0.00 day Hours: 0.00 hours Gold: 262,50 TC: 2 USD: 0.80
Level: 4 Mana: 2,13 Wands: 0.006 Days: 0.00 day Hours: 0.00 hours Gold: 262,50 TC: 2 USD: 0.80
Level: 5 Mana: 2,34 Wands: 0.007 Days: 0.00 day Hours: 0.00 hours Gold: 262,50 TC: 2 USD: 0.80
Level: 6 Mana: 2,57 Wands: 0.007 Days: 0.00 day Hours: 0.00 hours Gold: 262,50 TC: 2 USD: 0.
@midacts
midacts / azurerm_recovery_services_vault-skuError.txt
Created November 8, 2018 17:03
azurerm_recovery_services_vault: Sku error
Error: Error applying plan:
1 error(s) occurred:
* azurerm_recovery_services_vault.Backupvault: 1 error(s) occurred:
* azurerm_recovery_services_vault.Backupvault: Error creating/updating Recovery Service Vault "Backupvault" (Resource Gr
oup "our-rg"): recoveryservices.VaultsClient#CreateOrUpdate: Failure responding to request: StatusCode=4
00 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidRestApiParameter" Message="sku
parameter is invalid.\r\nPlease provide a valid sku"
@midacts
midacts / WoWAchievements.md
Last active June 3, 2018 20:16
WoW Achievements
@midacts
midacts / Set-CodeCoverageBadge.ps1
Last active May 18, 2018 01:18
Set-CodeCoverageBadge theoretical testing
function Set-CodeCoverageBadge {
<#
.SYNOPSIS
Sets the colour and percentage values of the code coverage badge displayed in readme.md or other specified file.
.FUNCTIONALITY
CI/CD
.DESCRIPTION
Sets the colour and percentage values of the code coverage badge displayed in readme.md or other specified file.
-/+ azurerm_app_service_plan.ASP1 (new resource required)
id: "/subscriptions/xxxxx/resourceGroups/ASE1/providers/Microsoft.Web/serverfarms/ASP-1" => <computed> (forces new resource)
kind: "app" => "Windows" (forces new resource)
location: "eastus" => "eastus"
maximum_number_of_workers: "100" => <computed>
name: "ASP-1" => "ASP-1"
properties.#: "1" => "1"
properties.0.app_service_environment_id: "/subscriptions/xxxxx/resourceGroups/ASE-1/providers/Microsoft.Web/hostingEnvironments/ASE-1" => "/subscriptions/xxxxx/resourceGroups/ASE-1/providers/Microsoft.Web/hostingEnvironments/ASE-1"
properties.0.per_site_scaling: "false" => "false"
properties.0.reserved: "false" => "false"
function New-VesterConfig {
<#
.SYNOPSIS
Generates a Vester config file from settings in your existing VMware environment.
.DESCRIPTION
New-VesterConfig is designed to be a quick way to get started with Vester.
Vester needs one config file for each vCenter server it interacts with. To
help speed up this one-time creation process, New-VesterConfig uses PowerCLI