Note
Highlights information that users should take into account, even when skimming.
> [!NOTE]
> Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Note
Highlights information that users should take into account, even when skimming.
> [!NOTE]
> Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
If, like me, you create new DotNet projects using the same layout and options; the following script should help.
Type $profile
in your Powershell Windows Terminal and edit the file at the path given by putting the following code in:
# ---------- dot net new simple alias for project creation
function Show-Menu {
param (
[string]$Title
)
// when T is any|unknown, Y is returned, otherwise N | |
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
// when T is never, Y is returned, otherwise N | |
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
// when T is a tuple, Y is returned, otherwise N | |
// valid tuples = [string], [string, boolean], | |
// invalid tuples = [], string[], (string | number)[] |
Unfortunately nvm use
on Windows does not change the node version to that specified in the .nvmrc
file as its not supported on nvm for Windows: coreybutler/nvm-windows#388
So the easiest solution to this is to use a simple Powershell command that performs an approximation of the command as follows:
nvm use $(Get-Content .nvmrc).replace( 'v', '' );
However, thats a bit awkward and we can do a bit more so instead, we can create an 'alias' to a function that calls the command instead:
function callnvm() {
#!/bin/sh | |
# Config options | |
min_length=4 | |
max_length=50 | |
types=("feat" "fix" "perf") | |
# End config options |
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
// To find location of yo folder type: | |
// 'which yo' | |
// and then replace the end segments '/npm/yo' with '/npm/node_modules/yo/lib/cli.js' | |
"version": "0.2.0", |
using System; | |
using System.Collections.Generic; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; | |
using Microsoft.Extensions.DependencyInjection; | |
using WebApplication16; | |
using WebApplication16.Controllers; |
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\W3SVC /v SvcHostSplitDisable /t REG_DWORD /d 1 /f | |
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\WAS /v SvcHostSplitDisable /t REG_DWORD /d 1 /f |
⇐ back to the gist-blog at jrw.fi
First there was JSLint, and there was much rejoicing. The odd little language called JavaScript finally had some static code analysis tooling to go with its many quirks and surprising edge cases. But people gradually became annoyed with having to lint their code according to the rules dictated by Douglas Crockford, instead of their own.
So JSLint got forked into JSHint, and there was much rejoicing. You could set it up to only complain about the things you didn't want to allow in your project, and shut up about the rest. JSHint has been the de-facto standard JavaScript linter for a long while, and continues to do so. Yet there will always be things your linter could check for you, but doesn't: your team has agreed on some convention that makes sense for them, but JSHint doesn't have an option