Skip to content

Instantly share code, notes, and snippets.

View mrzachhigginsofficial's full-sized avatar

Zachary Higgins mrzachhigginsofficial

  • Washington DC
View GitHub Profile
@mrzachhigginsofficial
mrzachhigginsofficial / pytest_selenium.py
Last active June 6, 2023 20:54
Pytest Fixture - Selenium
import pytest
from selenium import webdriver
@pytest.fixture
def browser():
# Setup code
options = webdriver.FirefoxOptions()
options.headless = True # Run the browser in headless mode
driver = webdriver.Firefox(options=options)
@mrzachhigginsofficial
mrzachhigginsofficial / azure_migratekv.ps1
Created June 6, 2023 20:45
Migrate Azure Key Vault Certificates
# run add-azaccount if login issues
# ----
# If az tools not installed, run:
# Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
################################################
$vaultName_old = ''
$subscription_old = ''
$vaultName_new = ''
$subscription_new = ''
@mrzachhigginsofficial
mrzachhigginsofficial / Export-SonarQubeProject.ps1
Created February 26, 2022 07:29 — forked from ddemeyer/Export-SonarQubeProject.ps1
Exporting from SonarQube to a CSV file (hence Excel XLSX file) for several projects, defaulted to the authenticated user's Favorites. Last run with success on 7.6.0.21501
Function Export-SonarQubeProject {
<#
.DESCRIPTION
Export projects from SonarQube into a .CSV (hence after Excel .XSLX file)
Script takes care of retrieving up to 10000 hits iteratively for your search criteria. And will warn if you have over 10000 hits which is SonarQube's limitation.
You can adapt the default parameters below for easy usage. In the 'Process' section there are parameters for more or less filtering on SonarQube projects.
.EXAMPLE
Export by user's favorites. Make sure you run this .PS1 file so it is loaded into your session.