Skip to content

Instantly share code, notes, and snippets.

View phenixita's full-sized avatar

Michele phenixita

View GitHub Profile
@phenixita
phenixita / AthleteSubmissionForm.js
Created June 8, 2023 17:09
AthleteSubmissionForm
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
import { LocalizationProvider } from "@mui/x-date-pickers";
import Button from "@mui/material/Button";
import { Formik, Form } from "formik";
import * as React from "react";
import useFetchWithMsal from "../hooks/useFetchWithMsal";
import { protectedResources } from "../authConfig";
import { Stack } from "@mui/system";
import { DatePicker } from "@mui/x-date-pickers";
import TextField from "@mui/material/TextField";
@phenixita
phenixita / dotNetSonar.txt
Created May 12, 2023 13:53
dotnet sonar scanner with code coverage
dotnet tool install --global dotnet-coverage
dotnet sonarscanner begin /k:"PROJECT_KEY" /d:sonar.host.url="http://localhost:9000" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.login="sqp_XXXXXXXXXXXXXX";
dotnet build --no-incremental
dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml";
@phenixita
phenixita / useFetchWithMsalAndResilience.js
Created May 10, 2023 19:55
msal with ExponentialBackoff (jitter included by default)
import { useState, useCallback } from "react";
import { InteractionType, PopupRequest } from "@azure/msal-browser";
import { useMsal, useMsalAuthentication } from "@azure/msal-react";
import {
ExponentialBackoff,
retry,
handleAll,
circuitBreaker,
@phenixita
phenixita / devvopps.yml
Created January 9, 2023 16:23
YT-K8S-Deployment-Manifest
apiVersion: apps/v1
kind: Deployment
metadata:
name: devvopps-aspmvc
spec:
selector:
matchLabels:
app: devvopps-aspmvc
template:
metadata:
@phenixita
phenixita / db.ci.yaml
Created October 22, 2021 10:42
Azure Pipeline for SQL Server database
trigger: none
pool:
#vmImage: 'windows-latest'
name: SQLPoc
variables:
gitBranchName: migration-script/$(build.buildId)
SqlScriptsFolder: $(Build.SourcesDirectory)\db_poc\Db-Migration-Scripts\sql
migrationScriptNumber: ''
trigger:
- main
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
@phenixita
phenixita / k6test.js
Created July 6, 2021 10:52
k6 simple test
import http from 'k6/http';
import { sleep } from 'k6';
export default function () {
http.get('https://test.k6.io');
sleep(1);
}
@phenixita
phenixita / nginx.yaml
Created July 6, 2021 10:05
Nginx for aks
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
template:
metadata:
@phenixita
phenixita / service.yaml
Last active July 6, 2021 10:03
Service
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- port: 8080
@phenixita
phenixita / devOpsStats.ps1
Created October 24, 2019 10:42
Powershell Scripts to gather some stats from Azure DevOps projects
function GetUrl() {
param(
[string]$orgUrl,
[hashtable]$header,
[string]$AreaId
)
# Build the URL for calling the org-level Resource Areas REST API for the RM APIs
$orgResourceAreasUrl = [string]::Format("{0}/_apis/resourceAreas/{1}?api-preview=5.0-preview.1", $orgUrl, $AreaId)