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.Collections.Generic; | |
| using System.Globalization; | |
| // https://stackoverflow.com/a/7048016/3542151 | |
| public class NaturalComparer: IComparer<string> | |
| { | |
| private readonly CultureInfo _culture; | |
| private readonly CompareOptions _compareOptions; | |
| public NaturalComparer(CultureInfo culture = null, CompareOptions? compareOptions = null) |
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
| !LButton:: | |
| Loop | |
| { | |
| if not GetKeyState("LButton", "P") && not GetKeyState("LAlt", "P") | |
| break | |
| Click | |
| } | |
| return |
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
| taskkill /im explorer.exe /f | |
| start explorer.exe | |
| exit |
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 areSameWeek(date1, date2){ | |
| if (date1.getDate() === date2.getDate()) | |
| return true; | |
| if (Math.abs(date1.getDate() - date2.getDate()) >= 7) | |
| return false; | |
| return (date1.getDay() > date2.getDay() && date1.getTime() > date2.getTime()) || | |
| (date1.getDay() < date2.getDay() && date1.getTime() < date2.getTime()); | |
| } |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AutoHotkeyScript\Shell\Edit] | |
| @="Edit Script" | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AutoHotkeyScript\Shell\Edit\Command] | |
| @="\"C:\\Program Files\\Microsoft VS Code Insiders\\Code - Insiders.exe\" \"%1\"" | |
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
| # | |
| # https:#www.howtogeek.com/224798/how-to-uninstall-windows-10s-built-in-apps-and-how-to-reinstall-them/ | |
| # | |
| # Uninstall 3D Builder: | |
| Get-AppxPackage *3dbuilder* | Remove-AppxPackage | |
| # Uninstall Calendar and Mail: | |
| Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\vscode] | |
| @="URL:vscode" | |
| "URL Protocol"="" | |
| [HKEY_CLASSES_ROOT\vscode\shell] | |
| [HKEY_CLASSES_ROOT\vscode\shell\open] |
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; | |
| using System.Collections.Generic; | |
| public class DefaultDictionary<TKey, TValue>: IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue> | |
| { | |
| private readonly Dictionary<TKey, TValue> _dictionary; | |
| public Func<TKey, TValue> ValueFactory { get; } |
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 class DefaultDictionary<TKey, TValue>: IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue> | |
| { | |
| private readonly Dictionary<TKey, TValue> _dictionary; | |
| public Func<TKey, TValue> ValueFactory { get; } | |
| #region Factory constructors | |
| public DefaultDictionary(Func<TKey, TValue> valueFactory) | |
| { |
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.Threading.Tasks; | |
| public static class TaskExtensions | |
| { | |
| /// <summary> | |
| /// Synchronously awaits task throwing first exception if any instead of <see cref="System.AggregateException"/>. | |
| /// </summary> | |
| public static T Await<T>(this Task<T> task) => task.GetAwaiter().GetResult(); | |
| /// <summary> |
NewerOlder