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
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace Ghostly.Utilities | |
{ | |
// Emoji list borrowed from https://github.com/lunet-io/markdig/blob/25959174d521c7f4458fa7b340d58a4ac136fa30/src/Markdig/Extensions/Emoji/EmojiParser.cs | |
public static class EmojiReplacer | |
{ | |
private static Regex _regex; | |
private static Dictionary<string, string> _lookup; |
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
{ | |
"defaultProfile": "{36bc5ffe-68fe-41b6-bc15-e64146552d34}", | |
"initialRows": 30, | |
"initialCols": 120, | |
"alwaysShowTabs": true, | |
"showTerminalTitleInTitlebar": false, | |
"experimental_showTabsInTitlebar": false, | |
"profiles": [ | |
{ | |
"startingDirectory": "%USERPROFILE%", |
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
Register-ArgumentCompleter -Native -CommandName myapp -ScriptBlock { | |
param($commandName, $wordToComplete, $cursorPosition) | |
$split = $wordToComplete.ToString().Split() | |
$command = [system.String]::Join("_", $split[1..$split.Length]) | |
$position = ($cursorPosition-$split[0].Length - 1); | |
myapp complete --position $position "$command" | ForEach-Object { | |
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) | |
} | |
} |
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 CakeVersion | |
{ | |
public static string Calculate(ICakeContext context) | |
{ | |
var branch = GetBranch(context); | |
if(string.IsNullOrWhiteSpace(branch)) { | |
throw new InvalidOperationException("Could not retrieve branch from Git."); | |
} | |
var tag = GetTag(context); |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Reflection; | |
using Xunit.Sdk; | |
namespace MyProject.Tests | |
{ | |
public sealed class EmbeddedResourceDataAttribute : DataAttribute | |
{ |
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
Task("Test").Does(() => { | |
Information("Testing stuff..."); | |
} | |
Task("Deploy").IsDependentOn("Test").Does(() => { | |
Information("Heavy deploy action"); | |
} | |
RunTarget("Deploy"); |
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-NuGetPackage( | |
[string]$Source = "http://nuget.org", | |
[string]$Package, | |
[string]$Version) | |
{ | |
$Url = "$Source/api/v2/package/$Package/$Version" | |
$Output = Join-Path (Get-Location) "$Package.$Version.nupkg" | |
(New-Object System.Net.WebClient).DownloadFile($Url, $Output) | |
} |
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
{ | |
"version": 2, | |
"targets": { | |
".NETCoreApp,Version=v1.0": { | |
"Cake.Common/0.16.0-alpha0084": { | |
"type": "package", | |
"dependencies": { | |
"Cake.Core": "0.16.0-alpha0084", | |
"System.ComponentModel.TypeConverter": "4.1.0", | |
"System.Runtime.Serialization.Json": "4.0.2", |
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
{ | |
"version": 2, | |
"targets": { | |
".NETCoreApp,Version=v1.0": { | |
"Cake.Common/0.16.0-alpha0084": { | |
"type": "package", | |
"dependencies": { | |
"Cake.Core": "0.16.0-alpha0084", | |
"System.ComponentModel.TypeConverter": "4.1.0", | |
"System.Runtime.Serialization.Json": "4.0.2", |
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
using System; | |
using Cake.Common.Diagnostics; | |
using Cake.Core; | |
using Cake.Core.Diagnostics; | |
using Cake.Frosting; | |
public class Program | |
{ | |
public static int Main(string[] args) | |
{ |