alpinejs.dev/
Alpine.js
alpinejs.dev/
My bookmarks and blogposts regarding Software Development in .NET, C#, Angular, JavaScript, CSS, Html
.NET Core 8 have built-in API rate limiter functionality.
Can be used in an API project like this in program.cs:
app.UseRateLimiter(); //(PUT BELOW CODE AFTER LINE: var app = builder.Build();) //Setup API request rate limiter //If a rate limit is exceeded in ASP.NET Core's Rate Limiting Middleware //HTTP response will have the status code: 429 Too Many Requests builder.Services.AddRateLimiter(options => { options.AddFixedWindowLimiter( "default", limiterOptions => { limiterOptions.PermitLimit = 10; // Allow 10 requests limiterOptions.Window = TimeSpan.FromSeconds(1); // Per second limiterOptions.QueueProcessingOrder = QueueProcessingOrder.OldestFirst; limiterOptions.QueueLimit = 2; // Allow 2 queued requests } ); });
Angular evolves for every version. Here is a good website that gives a clear overview which Angular APIs are in experimential, developer, stable or depracated state. Reminds a bit of the html/css/js caniuse.com web. (focus more on cross browser compability though).
Source: Angular CanIUse feature roadmap
When facing a performance issue, the Profiler is perfect for identifying the problem’s root cause. For instance, it could highlight that one component is much slower than the others and gets refreshed for no good reason, indicating that a different change detection strategy is needed.
Source: Angular profiler for performance tuning | Angular Newsletter
Directives such as *ngIf and *ngFor will soon get deprecated to favor the new control flow blocks.
E.g. old directives:
<ng-container *ngIf="isLoggedIn">...</ng-container>
Can now be replaced with the new syntax:
@if (isLoggedIn) { ... }
ShellMenuNew is a small utility that displays the list of all menu items in the ‘New’ submenu of Windows Explorer. It allows you to easily disable unwanted menu items, so this ‘New’ submenu will display only the items that you need.
Source: ShellMenuNew – Disable/enable ‘New’ menu items in Windows Explorer
Our CSS Animation Generator is the perfect tool for web developers and designers! You can build the perfect animation for your project, choosing from a wide variety of predefined animations or customizing any of them through user-friendly options. Tailor properties like name, duration, timing, and delay to suit your design needs, and bring your website to life with seamless motion effects. Perfect for beginners and experts alike, this tool makes creating animations easier, saving you lots of time and effort
This probably works for other IDEs as well such as VS Code.
My context is Windows 10 and Webstorm version 2024.3.2.1
Problem: was connected to my “work” github account and wanted also to be able to work with repos in my “private” github account.
Added the Github account in webstorm settings -> version control -> github -> (was logged in on github private account in web browser), got web browser authenticate question -> ok
Cloned a repo, got similar to the following git error message:
remote: Repository not found. fatal: repository 'https://github.com/MyUser/MyRepo.git/' not found
The repository exists at that location, its an auth problem.
Solution:
Tried to setup SSH but was a bit difficult, the “GitHub Desktop” application had no problem cloning and pushing though, but wanted it to work within Webstorm.
I tried the Github CLI application, download here: https://cli.github.com/
Open a terminal within Webstorm/at the project root and execute the gh command:
gh auth login
Follow the instructions regarding auth with web browser, (enter the one-time code at https://github.com/login/device).
Output from my terminal:
$ gh auth login ? Where do you use GitHub? GitHub.com ? What is your preferred protocol for Git operations on this host? HTTPS ? Authenticate Git with your GitHub credentials? Yes ? How would you like to authenticate GitHub CLI? Login with a web browser ! First copy your one-time code: ABCD-1234 Press Enter to open https://github.com/login/device in your browser... ✓ Authentication complete. - gh config set -h github.com git_protocol https ✓ Configured git protocol ✓ Logged in as AndreasPlahn
Voila! Now it works for me, at least.
Update:
When pushing from Webstorm I get a dialog (on every push) which github acccount I want to be acting as.
This was annoying. Solved in this way:
(in cmd):
git credential-manager github list
-> see all logged in accounts
git credential-manager github logout <MyGithubAccountName>
-> logout one of the accounts to avoid
More info about git credential-manager in Windows:
https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/usage.md