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
# Github action to clone PR to another repository. | |
name: clone-pr | |
on: | |
pull_request: | |
types: [ opened ] | |
branches: [ main ] | |
jobs: | |
clone: |
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 Disposable | |
{ | |
public static IDisposable Create(Action dispose) => | |
new DisposableAction(dispose); | |
public static IAsyncDisposable Create(Func<ValueTask> dispose) => | |
new AsyncDisposableAction(dispose); | |
private sealed class DisposableAction: IDisposable |
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
// Workaround for https://github.com/dotnet/efcore/issues/17936 | |
// Requires https://www.nuget.org/packages/LinqKit/ | |
// EFCoreHacks.Rewrite is a custom "expression optimizer" for LinqKit, which should be set to LinqKitExtension.QueryOptimizer | |
// I do it in my DbContext static constructor. It allows us to use SelectEF and FirstOrDefaultEF extensions methods, | |
// which are to be rewritten before the expression is passed to EF query translator. Those force EF to use OUTER APPLY with proper predicate. | |
// | |
// SelectEF(exp) -> .Select(exp).Take(Int32.MaxValue).ToArray(); | |
// FirstOrDefaultEF -> .Take(1).ToArray().FirstOrDefault(); | |
// |
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
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\GitExtensions2] |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced] | |
"DisabledHotkeys"="Q" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<perfbar> | |
<counters> | |
<!-- you can run `typeperf -q>counters.txt` to list all available counters on your system --> | |
<counter name="cpu" value="\Processor Information(*)\% Processor Time"/> | |
<counter name="mem" value="\Memory\% Committed Bytes In Use"/> | |
<counter name="netin" value="\Network Interface(*)\Bytes Received/sec"/> | |
<counter name="netout" value="\Network Interface(*)\Bytes Sent/sec"/> | |
</counters> | |
<pages> |
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
Import-Module posh-git | |
Import-Module oh-my-posh | |
Set-PoshPrompt -Theme pure-custom | |
Set-PSReadLineOption -Colors @{ | |
"Default" = [ConsoleColor]::Black | |
"Parameter" = [ConsoleColor]::Black | |
"Type" = [ConsoleColor]::DarkBlue | |
"Number" = [ConsoleColor]::Magenta | |
"String" = [ConsoleColor]::Magenta |
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
"copyOnSelect": true, | |
"profiles": { | |
"defaults": { | |
"colorScheme": "Solarized Light Custom", | |
"fontFace": "Consolas NF", | |
"fontSize": 11 | |
}, | |
"list": [ | |
{ | |
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", |
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
{ | |
"final_space": false, | |
"console_title": true, | |
"console_title_style": "template", | |
"console_title_template": "{{if .Root}}(Admin){{end}} {{.Path}}", | |
"blocks": [ | |
{ | |
"type": "newline", | |
"alignment": "", | |
"horizontal_offset": 0, |
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
"workbench.colorTheme": "Visual Studio Light", | |
"workbench.colorCustomizations": { | |
"editor.background": "#F7F7F7", | |
"editor.foreground": "#000", | |
"editor.lineHighlightBackground": "#F0F0F0", | |
"editor.selectionBackground": "#BFDBFE", | |
"editor.selectionHighlightBackground": "#E0E0E0", | |
"panel.background": "#F0F0F0", | |
"sideBar.background": "#F0F0F0", | |
"editorGroupHeader.tabsBackground": "#F0F0F0", |