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
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json | |
"$schema": https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json | |
palette: | |
left_header_bg: "#898989" | |
left_header_fg: "#000000" | |
path_bg: "#656565" | |
path_fg: "#dfdfdf" |
More generally, this is the list I give to teams at work:
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 Get-TfsWorkspace | |
{ | |
# Script to find a Team Foundation workspace | |
[cmdletbinding()] | |
param( | |
[string] $workspaceHint = $pwd | |
) | |
begin | |
{ |
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
public static class AssertEx | |
{ | |
public static void Throws<T>(Action action) where T : Exception | |
{ | |
Exception actual = null; | |
try | |
{ | |
action(); | |
} |
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
public static class Contract | |
{ | |
public static void Requires(Expression<Func<bool>> assertion) | |
{ | |
if(!assertion.Compile()()) | |
{ | |
throw new ContractRequirementException(string.Format("Expression {0} evaluated to false", assertion.ToString())); | |
} | |
} |
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
public static class Extensions | |
{ | |
public static TEnum AsEnum<TEnum>(this string input, Func<string, TEnum> func) | |
{ | |
return func(input); | |
} | |
public static TEnum AsEnum<TEnum>(this string input) | |
{ | |
return (TEnum)Enum.Parse(input, typeof(TEnum)); |