Install the Windows Terminal from the Microsoft Store.
Alternatively,
winget install --id Microsoft.WindowsTerminal -e
choco install microsoft-windows-terminal
Install the Windows Terminal from the Microsoft Store.
Alternatively,
winget install --id Microsoft.WindowsTerminal -e
choco install microsoft-windows-terminal
Improve developer's experience inside powershell, adding useful commands like Add-PathVariable. This is optional but recommended to minimize confirmation of every single action you invoke.
First let's update powershell itself (elevated):
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| /// <summary> | |
| /// This action filter ensures ModelState.IsValid is true as a precondition to entry into the MVC action | |
| /// </summary> | |
| /// <remarks> | |
| /// This class also validates all action parameters unlike the default behavior of ModelState.IsValid | |
| /// </remarks> | |
| /// <see cref="https://blog.markvincze.com/how-to-validate-action-parameters-with-dataannotation-attributes/" /> | |
| public class EnsureModelStateIsValid : ActionFilterAttribute | |
| { | |
| private static readonly ConcurrentDictionary<MethodInfo, ParameterInfo[]> MethodCache |
| /// <summary> | |
| /// Base58 is case SENSITIVE alphanumeric ELIMINATING: 0 (zero) I (uppercase), O (upppercase), l (lowercase) | |
| /// This reduction of characters eliminates the majority of human typoposition errors | |
| /// </summary> | |
| public class Base58 | |
| { | |
| private static readonly BaseN base58 = new BaseN("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); //base58 | |
| public static string Encode(long @long) => base58.Encode(@long); |
| struct OrdinalIgnoreCaseString : IEquatable<OrdinalIgnoreCaseString>, IEquatable<string> { | |
| string _str; | |
| public OrdinalIgnoreCaseString(string str) { | |
| _str = str; | |
| } | |
| public static implicit operator OrdinalIgnoreCaseString(string str) { | |
| return new OrdinalIgnoreCaseString(str); | |
| } |
| (function(d) { | |
| d.Observe = {} | |
| })(jQuery); | |
| (function(d, q) { | |
| var r = function(e, f) { | |
| f || (f = e, e = window.document); | |
| var m = []; | |
| d(f).each(function() { | |
| for (var l = [], g = d(this), h = g.parent(); h.length && !g.is(e); h = h.parent()) { | |
| var f = g.get(0).tagName.toLowerCase(); |
| [alias] | |
| co = checkout | |
| ci = commit | |
| branches = branch | |
| syncdev = "!git fetch origin; git merge origin/development" | |
| up-c = checkout -f |
| // Runnable from Linqpad 5 | |
| // Must install the Sigil nuget package and include the Sigil namespace | |
| void Main() | |
| { | |
| var createSample = GetMapperDelegate(); | |
| // try it out | |
| createSample(23, "Hello").Dump(); | |
| } |
| //replace this method | |
| commandProto.doHeading = function (chunk, postProcessing) { | |
| // Remove leading/trailing whitespace and reduce internal spaces to single spaces. | |
| chunk.selection = chunk.selection.replace(/\s+/g, " "); | |
| chunk.selection = chunk.selection.replace(/(^\s+|\s+$)/g, ""); | |
| // If we clicked the button with no selected text, we just | |
| // make a level 2 hash header around some default text. | |
| if (!chunk.selection) { | |
| chunk.startTag = "#### "; /* rewrite to start at H4 instead */ |