Skip to content

Instantly share code, notes, and snippets.

View tomaszprasolek's full-sized avatar
😊

Tomasz Prasołek tomaszprasolek

😊
View GitHub Profile
kubectl config get-contexts
kubectl config use-context aks_asadfs_tst
-----------------------------------------------------------
kubectl get svc
kubectl get pods
kubectl port-forward svc/asai-template 8888:80
kubectl logs asai-template-d6d74fc89-z8pn9
/opt/bitnami/kafka/bin$
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 / 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.
$.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