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
/* | |
To address trouble with... | |
myList.ForEach( async x => ...do async work... ) | |
where control returns before async operations are complete, | |
consider... | |
*/ | |
namespace Example | |
{ | |
public static async Task ForEachAsync<T>( this IEnumerable<T> list, Func<T, Task> func ) |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using NUnit.Framework; | |
[TestFixture] | |
public class Yield_Versus_Linq_Tests | |
{ | |
[Test] |
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
git checkout [commit-sha]~1 -- \path\to\file1.txt \path\to\file2.txt \path\to\file3.txt |
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
$x = Get-Content -Path .\the\path.txt; Set-Content -Path .\the\path.txt -Value ($x[($x.Length-1)..0]) |
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
git log --pretty=format:"%ad %s" --date=short --topo-order |
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
git commit --amend --no-edit --date "2018-01-01 00:00:00" |
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
git reset ***SHA*** | |
git diff > c:\full\path\to\patch-file.txt |
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
git ls-files -s /relative/path/to/file/in/repo.ext | |
# SEE https://stackoverflow.com/questions/460297/git-finding-the-sha1-of-an-individual-file-in-the-index |
OlderNewer