Hot Reload for ASP.NET Core
dotnet watch
dotnet run
dotnet build
dotnet watch build
References
https://docs.microsoft.com/en-us/aspnet/core/test/hot-reload
https://docs.microsoft.com/en-us/aspnet/core/tutorials/dotnet-watch
dotnet watch
dotnet run
dotnet build
dotnet watch build
References
https://docs.microsoft.com/en-us/aspnet/core/test/hot-reload
https://docs.microsoft.com/en-us/aspnet/core/tutorials/dotnet-watch
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key sudo apt-key add winehq.key
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'
sudo apt update
sudo apt install --install-recommends winehq-stable
References
https://wiki.winehq.org/Ubuntu
Install NVIDIA proprietary drivers on Debian / Ubuntu / Linux Mint / LMDE and disable the nouveau driver
Make sure that you system is up-to-date and you are running latest kernel, also make sure that you don’t have any Debian / Ubuntu / Linux Mint / LMDE NVIDIA package installed
## Ubuntu / Debian / Linux Mint / LMDE ## apt update apt upgrade ## Debian and Linux Mint ## apt autoremove $(dpkg -l nvidia-driver* |grep ii |awk '{print $2}') ## Ubuntu ## apt autoremove $(dpkg -l xserver-xorg-video-nvidia* |grep ii |awk '{print $2}') apt reinstall xserver-xorg-video-nouveau
Install needed dependencies
## Ubuntu / Debian / Linux Mint ## apt install linux-headers-$(uname -r) gcc make acpid dkms libglvnd-core-dev libglvnd0 libglvnd-dev dracut wget patch libgtk2.0-0
Disable nouveau
Create or edit /etc/modprobe.d/blacklist.conf
Append ‘blacklist nouveau’
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
Edit /etc/default/grub
Append ‘rd.driver.blacklist=nouveau’ to end of ‘GRUB_CMDLINE_LINUX=”…”‘.
## Example row on Debian ## GRUB_CMDLINE_LINUX_DEFAULT="quiet rd.driver.blacklist=nouveau" ## OR with Ubuntu and Linux Mint ## GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rd.driver.blacklist=nouveau"
Update grub2 conf
## BIOS and UEFI ## update-grub2
Generate initramfs
## Backup old initramfs nouveau image ## mv /boot/initrd.img-$(uname -r) /boot/initrd.img-$(uname -r)-nouveau ## Generate new initramfs image ## dracut -q /boot/initrd.img-$(uname -r) $(uname -r)
Create new directory for inttf NVIDIA patcher
cd ~ mkdir NVIDIA cd NVIDIA
Download / Update inttf NVIDIA patcher
wget -O inttf-nvidia-patcher.sh https://nvidia.if-not-true-then-false.com/patcher/inttf-nvidia-patcher.sh
Make inttf NVIDIA patcher executable
chmod +x inttf-nvidia-patcher.sh
Download and patch your drivers
./inttf-nvidia-patcher.sh -v 340.108
Reboot to runlevel 3
systemctl set-default multi-user.target reboot
Run NVIDIA Binary
./NVIDIA-Linux-x86_64-340.108-patched-kernel-5.15.run
systemctl set-default graphical.target reboot
References
https://www.if-not-true-then-false.com/2021/debian-ubuntu-linux-mint-nvidia-guide/
https://www.if-not-true-then-false.com/2020/inttf-nvidia-patcher/
wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb
sudo apt-get update; \ sudo apt-get install -y apt-transport-https && \ sudo apt-get update && \ sudo apt-get install -y dotnet-sdk-6.0
References
https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
xgamma -gamma 0.8
add this command to Startup Application Preferences.
So now every time I login, the gamma is adjusted and the display looks much better.
References
https://ubuntu-mate.community/t/how-to-change-screen-gamma-using-xgamma/12969
https://askubuntu.com/questions/9248/is-there-a-software-utility-to-adjust-screen-gamma-brightness-contrast
References
https://virgool.io/web-how/%D8%A7%D9%84%DA%AF%D9%88%DB%8C-cqrs-%DA%86%DB%8C%D8%B3%D8%AA-ae0ys7qoeozw
https://www.aparat.com/result/_CQRS_%DA%86%DB%8C%D8%B3%D8%AA
https://www.youtube.com/watch?v=qJA6MaQ90YY
https://www.youtube.com/watch?v=YzOBrVlthMk
https://codeopinion.com/is-cqrs-complicated/
https://dzone.com/articles/microservices-with-cqrs-and-event-sourcing
gRPC calls can be interrupted by transient faults. Transient faults include:
When a gRPC call is interrupted, the client throws an RpcException
with details about the error. The client app must catch the exception and choose how to handle the error.
var client = new Greeter.GreeterClient(channel); try { var response = await client.SayHelloAsync( new HelloRequest { Name = ".NET" }); Console.WriteLine("From server: " + response.Message); } catch (RpcException ex) { // Write logic to inspect the error and retry // if the error is from a transient fault. }
Duplicating retry logic throughout an app is verbose and error-prone. Fortunately, the .NET gRPC client now has built-in support for automatic retries. Retries are centrally configured on a channel, and there are many options for customizing retry behavior using a RetryPolicy
.
var defaultMethodConfig = new MethodConfig { Names = { MethodName.Default }, RetryPolicy = new RetryPolicy { MaxAttempts = 5, InitialBackoff = TimeSpan.FromSeconds(1), MaxBackoff = TimeSpan.FromSeconds(5), BackoffMultiplier = 1.5, RetryableStatusCodes = { StatusCode.Unavailable } } }; // Clients created with this channel will automatically retry failed calls. var channel = GrpcChannel.ForAddress("https://localhost:5001", new GrpcChannelOptions { ServiceConfig = new ServiceConfig { MethodConfigs = { defaultMethodConfig } } });
References
https://devblogs.microsoft.com/dotnet/grpc-in-dotnet-6/
https://docs.microsoft.com/en-us/aspnet/core/grpc/retries?view=aspnetcore-6.0
The following code example configures a channel to use DNS service discovery with round-robin load balancing:
var channel = GrpcChannel.ForAddress( "dns:///my-example-host", new GrpcChannelOptions { Credentials = ChannelCredentials.Insecure, ServiceConfig = new ServiceConfig { LoadBalancingConfigs = { new RoundRobinConfig() } } }); var client = new Greet.GreeterClient(channel); var response = await client.SayHelloAsync(new HelloRequest { Name = "world" });
References
https://devblogs.microsoft.com/dotnet/grpc-in-dotnet-6/
https://docs.microsoft.com/en-us/aspnet/core/grpc/loadbalancing?view=aspnetcore-6.0
using System.Net.Http.Headers; using System.Net.Http.Json; var userHandlers = new [] { "users/VahidN", "users/shanselman", "users/jaredpar", "users/davidfowl" }; using HttpClient client = new() { BaseAddress = new Uri("https://api.github.com"), }; client.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("DotNet", "6")); ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = 3 }; await Parallel.ForEachAsync(userHandlers, parallelOptions, async (uri, token) => { var user = await client.GetFromJsonAsync<GitHubUser>(uri, token); Console.WriteLine($"Name: {user.Name}\nBio: {user.Bio}\n"); }); public class GitHubUser { public string Name { get; set; } public string Bio { get; set; } }
References
https://www.hanselman.com/blog/parallelforeachasync-in-net-6