git reset --soft HEAD~
https://stackoverflow.com/a/63343196/194717
git reset --soft HEAD~
https://stackoverflow.com/a/63343196/194717
I did this to solve a conflict when doing a pull request
git pull
git checkout <feature_branch>
git pull origin <destination_branch>
At this point, pulling the destination will try to merge it with the source and reveal all the conflicts.
computer:my-repository emmap$ git pull origin main
* branch main -> FETCH_HEAD
Auto-merging team_contact_info.txt
CONFLICT (content): Merge conflict in team_contact_info.txt
Automatic merge failed; fix conflicts and then commit the result.
Open the file to resolve the conflict. You can do this using the command line or you can navigate to the file.
git add <filename>
git commit -m'commit message'
git push origin <feature_branch>
https://support.atlassian.com/bitbucket-cloud/docs/resolve-merge-conflicts/
netsh wlan show profile WIFISSID key=clear
replace WIFISSID with your actual WiFi SSID
//public void ConfigureServices(IServiceCollection services)
services.AddResponseCompression(options =>
{
options.MimeTypes = new[] { "application/json" };
//options.EnableForHttps = true;
});
// ...
// public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceScopeFactory scopeFactory)
app.UseResponseCompression();
Beware of the security issues when using EnableForHttps .
builder.Services.AddRateLimiter(o =>
{
o.AddTokenBucketLimiter("token", y =>
{
y.TokenLimit = 100;
y.QueueProcessingOrder = System.Threading.RateLimiting.QueueProcessingOrder.OldestFirst;
y.QueueLimit = 5;
y.ReplenishmentPeriod = TimeSpan.FromSeconds(10);
y.TokensPerPeriod = 20;
y.AutoReplenishment = true;
});
});
Source: https://twitter.com/mjovanovictech/status/1676185657092317187
To read a query string value, there is the [Parameter] [SupplyParameterFromQuery]
@page "/"
<span>MyValue: @MyValue</span>
@code
{
[Parameter]
[SupplyParameterFromQuery]
public string MyValue { get; set; }
}
Authentication in Blazor Server
You're using AuthenticationStateProvider wrong in your Blazor Server app! Let's fix it!
To parse multipart form using .NET 7, you can use the MultipartFormDataParser
class from the Http-Multipart-Data-Parser
package1. You can parse the stream containing the multipart/form-data by invoking MultipartFormDataParser.Parse
(or it’s asynchronous counterpart MultipartFormDataParser.ParseAsync
). Access the data through the parser1.
Here’s an example of how you can parse a multipart/form-data request in .NET 7 using Http-Multipart-Data-Parser
package1:
using HttpMultipartParser;
using System.IO;
// ...
var parser = new MultipartFormDataParser(Request.Body);
foreach (var file in parser.Files)
{
var filename = file.FileName;
var contentType = file.ContentType;
var content = file.Data;
// Do something with the file
}
I hope this helps! Let me know if you have any other questions.
{"api":"PutBlob","clientRequestId":"11274a18-88ad-4038-8411-0f8c12e06016","requestId":"f336c9c2-301e-0054-113a-6636d4000000","eTag":"0x8DB345182F07EBA","contentType":"video/mp4","contentLength":18026572,"blobType":"BlockBlob","url":"https://[storageaccount].blob.core.windows.net/teste/dub_portugues.mp4","sequencer":"0000000000000000000000000000663400000000013c15cb","storageDiagnostics":{"batchId":"96d72e50-6006-0014-003a-6631ec000000"}}
{"api":"DeleteBlob","clientRequestId":"5f63b2d5-e9ed-4dca-9a02-484424c9b6d6","requestId":"12e55510-e01e-0057-4e3a-66d7b0000000","eTag":"0x8DB34516DF03AB1","contentType":"video/mp4","contentLength":18035781,"blobType":"BlockBlob","url":"https://[storageaccount].blob.core.windows.net/teste/dub_espanol.mp4","sequencer":"0000000000000000000000000000663400000000013c143d","storageDiagnostics":{"batchId":"96d682ca-6006-0014-003a-6631ec000000"}}
Related:
How to receive Azure Storage Account Network Share File and Directory events on Azure Event Grid Subscription?
https://stackoverflow.com/q/75921159/194717
This is my setup:
steps: - task: Cache@2 displayName: 'Cache npm' inputs: key: '"YourAppName" | "$(Build.SourceBranchName)" | "Android" | "npm" | "$(Agent.OS)" | "$(myDate)" | $(Build.SourcesDirectory)/package.json' path: '$(Build.SourcesDirectory)/node_modules' cacheHitVar: 'CACHE_RESTORED'