Skip to content

Instantly share code, notes, and snippets.

View StefH's full-sized avatar

Stef Heyenrath StefH

View GitHub Profile
@StefH
StefH / create.yaml
Last active January 19, 2024 08:36
yaml aaa
%YAML 1.2
---
YAML: YAML Ain't Markup Language™
What It Is:
YAML is a human-friendly data serialization
language for all programming languages.
YAML Resources:
YAML Specifications:
pool:
vmImage: 'vs2017-win2016'
variables:
buildConfiguration: 'Debug'
buildId: "1$(Build.BuildId)"
steps:
# Print buildId
- script: |
@StefH
StefH / FluentIt.cs
Last active February 16, 2022 14:25
FluentIt
using System;
using FluentAssertions;
using Moq;
using Xunit;
namespace TestProject1;
public static class FluentIt
{
public static TValue IsEquivalentTo<TValue>(TValue expectation)
@StefH
StefH / AutoMapperExtensions.cs
Created December 30, 2018 18:25
AutoMapper Extensions : Unflatten
using System;
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
// ReSharper disable once CheckNamespace
namespace AutoMapper
{
public static class AutoMapperExtensions
{
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
},
"location": {
"type": "string"
},
@StefH
StefH / Azure_Pipelines_Create_Resources.cmd
Last active March 28, 2021 10:39
Azure_Pipelines_Create_Resources.cmd
az group create -n test-azuredevops -l westus2
az staticwebapp create -l westus2 -n test-azuredevops -g test-azuredevops -s "" -b "" --token "-"
pool:
vmImage: ubuntu-latest
steps:
- task: AzureStaticWebApp@0
inputs:
app_location: "Client" # App source code path
api_location: "Api" # Api source code path
output_location: "wwwroot" # Built app content directory
build_and_deploy_job:
name: Build and Deploy Job
steps:
...
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_*** }}
app_location: "Client" # App source code path
@StefH
StefH / SimpleStorageContract.sol
Created May 22, 2019 05:54
SimpleStorage SmartContract
pragma solidity >=0.5.2 <0.6.0;
contract SimpleStorageContract {
int private _version;
string private _description;
uint private _storedNumber;
string private _storedString;
constructor (int version, string memory description) public {
@StefH
StefH / blazor.webassembly.js-github-action.yml
Last active June 20, 2020 12:17
Patch blazor.webassembly.js
- name: Patch blazor.webassembly.js
uses: jacobtomlinson/gha-find-replace@master
with:
find: "return r.loadResource\\(o,t\\(o\\),e\\[o\\],n\\)"
replace: "var p = r.loadResource(o,t(o),e[o],n); p.response.then((x) => { if (typeof window.loadResourceCallback === 'function') { window.loadResourceCallback(Object.keys(e).length, o, x);}}); return p;"
include: "blazor.webassembly.js"