Action | Keys | Notes |
---|---|---|
Down, Up, Left, Right | h, j, k, l | |
Start/end of line | ^/$ | |
Beginning of next word/non-whitespace | w/W | |
End of word/non-whitespace | e/E | |
Move until "x" | tx |
This file contains hidden or 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
public static class MealProvider | |
{ | |
private static Func<Meal> _provider = () => new DefaultMeal(); | |
public static void Configure(Func<Meal> provider) | |
{ | |
_provider = provider; | |
} | |
public static Meal NewMeal() |
This file contains hidden or 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
// This is not CQRS: | |
public interface IRobotService | |
{ | |
void Walk(); | |
void Sleep(); | |
int GetBatteryLevel(); | |
void GoOutAndComeBackInAgain(); | |
} | |
// This is CQRS. You can "level-up" from here, but this is all it is, really |
This file contains hidden or 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 Invoke-ParameterisedSqlQuery { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[string] $ConnectionString, | |
[Parameter(Mandatory)] | |
[string] $Query, | |
[Parameter(ValueFromPipeline)] | |
[PSCustomObject[]] $QueryArgs | |
) |
This file contains hidden or 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 Get-Version { | |
# TODO: Implement a call to GitVersion on the command line to find the current version from the repo | |
} | |
function New-Tag { | |
[CmdletBinding(SupportsShouldProcess=$true)] | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $Tag) | |
process { |
This file contains hidden or 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
public interface Event | |
{ | |
public Guid Id; | |
public Guid CausationId; | |
public CorrelationId; | |
public Guid [AggregateName]Id; | |
public int Version; | |
} |
This file contains hidden or 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 Update-ConnectionString { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
[string[]] $ConnectionString, | |
[Parameter(Mandatory = $true)] | |
[string] $PropertyName, | |
[Parameter(Mandatory = $true)] | |
[string] $Value) | |
begin { |
This file contains hidden or 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
gci -r -inc packages.config | | |
%{ | |
([xml](get-content $_)).packages.package.id | | |
Add-Member -NotePropertyName 'PackageConfigFile' -NotePropertyValue $_ -PassThru | |
} | | |
?{ $_ -like 'MyCompany.*' } | | |
%{ nuget.exe update $_.PackageConfigFile -Id $_ -RepositoryPath (join-path (split-path (Split-Path $_.PackageConfigFile)) 'packages') } |