Skip to content

Instantly share code, notes, and snippets.

View tomaszprasolek's full-sized avatar
😊

Tomasz Prasołek tomaszprasolek

😊
View GitHub Profile
@tomaszprasolek
tomaszprasolek / CustomJsonCoverter.cs
Created June 9, 2024 14:07
Use custom JsonConverter to serialize and deserialize values
using System.Text.Json;
using System.Text.Json.Serialization;
string json = """
{
"Status": "PENDING"
}
""";
@tomaszprasolek
tomaszprasolek / gist:fbe0aaa42aba0e379b70374feb722c39
Created June 7, 2024 07:21
Run dotnet project on specified port
dotnet .\src\{projectName}.dll --environment=Development --urls=http://0.0.0.0:5202
@tomaszprasolek
tomaszprasolek / gist:fd931291da1f5d4c67f6c1072e295b5b
Created June 3, 2024 09:26
Auto Hot Key - script - autostart
C:\Users\{userName}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Put `git_script.ahk` script in the above location.
@tomaszprasolek
tomaszprasolek / illusi0n.omp.json
Created May 22, 2024 08:02
oh my posh - illusi0n theme customization
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "{{.Folder}}{{if .Root}} :: root{{end}}",
"blocks":
[
{
"segments":
[
{
"type": "kubectl",
@tomaszprasolek
tomaszprasolek / gist:9140359ab93668773addb6e233c7e6b1
Last active June 3, 2024 12:24
Windows Terminal +Oh-my-posh config
Set-PSReadLineOption -PredictionViewStyle ListView -PredictionSource History -HistoryNoDuplicates
Import-Module -Name Terminal-Icons
oh-my-posh init pwsh --config 'C:\Users\Tomasz.Prasolek\AppData\Local\Programs\oh-my-posh\themes\illusi0n.omp.json' | Invoke-Expression
$env:POSH_GIT_ENABLED = $true
New-Alias sbl "C:\Program Files\Sublime Text\sublime_text.exe"
$.body..accountDetails[?(@.productId=="SmallLoan")]..accountNumber
$.body[?(@.customerId==1426)].accountDetails[?(@.productId=="SmallLoan")]
dotnet tool update --global --configfile "D:\CSHARK\Nuget\NuGet-OfficialOnly.config" dotnet-ef
@tomaszprasolek
tomaszprasolek / gist:ab1273213557a1449153eb6c3897a11d
Created January 31, 2024 10:00
Kafka CLI - create topic and change config
kafka-topics.sh --bootstrap-server localhost:9092 --create --topic dlq-test-performance --partitions 3 --replication-factor 3 --config retention.ms=2419200000
kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name dlq-test-performance --alter --add-config retention.ms=2419200000
@tomaszprasolek
tomaszprasolek / gist:a1d66512bf30afd5019df6b20a2255ab
Created November 27, 2023 18:48
Replace text in Git history using git filter-repo
git filter-repo --replace-text expressions.txt
File expressions.txt contains only word I want to change
@tomaszprasolek
tomaszprasolek / gist:bfd4db8d30cc6f93e9285c0b117b10f7
Last active October 10, 2023 12:41
Local code coverage report
-- xUnit
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
reportgenerator -reports:"coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html
-- nUnit
dotnet test --collect:"XPlat Code Coverage"
reportgenerator -reports:".\TestResults\6531b870-6841-41a7-96fb-534c49347eca\coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html