-
Use Onion architecture
- Dependencies go inwards. That is, the Core domain doesn't know about outside layers
-
Use pipeline model to implement workflows/use-cases/stories
- Business logic makes decisions
- IO does storage with minimal logic
- Keep Business logic and IO separate
-
Keep IO at edges
This file contains 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
<template> | |
<div> | |
<slot/> | |
</div> | |
</template> | |
<script> | |
// @ts-check | |
/** |
This file contains 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
function PullAllBranches() { | |
$branches = git branch | |
foreach($branch in $branches){ | |
$fixedBranch = $branch.Substring(2, $branch.Length - 2) | |
$trackedExpression = "branch." + $fixedBranch + ".merge" | |
$trackedBranch = git config --get $trackedExpression | |
# Write-Host($trackedBranch) | |
if(![string]::IsNullOrEmpty($trackedBranch)) | |
{ | |
Write-Host('Pulling branch: ' + $fixedBranch) |
This file contains 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
# PowerShell can infer generic <T> for method calls for your, when it has a parameter of the same type <T> | |
# Example: Enumerable.Distinct<TSource>(IEnumerable<TSource>) | |
# TSource can be inferred from the argument | |
[System.Linq.Enumerable]::Distinct([int[]]@(1,2,3,1,2)) | |
# Let's say you want to call a generic method without ability to infer types. | |
# Example: Enumerable.OfType<TResult>() | |
# Idially you may expect syntax like this | |
# [System.Linq.Enumerable].OfType[int](@(,@(1,2,'a')) | |
# where you tell PowerShell type explicitly. |
This file contains 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
# Usage: powershell ExportSchema.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>" | |
# Start Script | |
Set-ExecutionPolicy RemoteSigned | |
# Set-ExecutionPolicy -ExecutionPolicy:Unrestricted -Scope:LocalMachine | |
function GenerateDBScript([string]$serverName, [string]$dbname, [string]$scriptpath) | |
{ | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null |
This file contains 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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |