Skip to content

Instantly share code, notes, and snippets.

View dotdiego's full-sized avatar

Diego dotdiego

  • France
View GitHub Profile
@davidfowl
davidfowl / MinimalAPIs.md
Last active March 16, 2025 16:47
Minimal APIs at a glance
@nguyenthang98
nguyenthang98 / client.hcl
Created April 21, 2021 05:48
Keepalived with Nomad
client {
enabled = true
node_class = ""
no_host_uuid = false
servers = ["10.253.155.163","10.253.155.17","10.253.155.102"]
max_kill_timeout = "30s"
@kwonghung-YIP
kwonghung-YIP / backup-docker-secrets.sh
Created October 15, 2019 03:26
Shell script for export all secrets defined in docker swarm
#!/bin/bash
service_name="backup-all-secrets"
secret_list=( `docker secret ls --format "{{ .Name }}"` )
cmd="docker service create \
--name $service_name \
--constraint node.hostname==`hostname` "
for secret in "${secret_list[@]}"
@GetoXs
GetoXs / ServiceCollectionExtentions.cs
Last active March 2, 2024 06:06
Register All Types (with Generic) in .NET Core DependencyInjection
using System;
using System.Linq;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
public static class ServiceCollectionExtentions
{
public static void AddAllTypes<T>(this IServiceCollection services
, Assembly[] assemblies
, bool additionalRegisterTypesByThemself = false
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active July 7, 2025 05:42
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@shawmanz32na
shawmanz32na / Dockerfile
Last active July 11, 2023 17:18
mssql-docker with seed data
FROM microsoft/mssql-server-linux
COPY . /usr/src/app
ENTRYPOINT [ "/bin/bash", "/usr/src/app/docker-entrypoint.sh" ]
CMD [ "/opt/mssql/bin/sqlservr" ]
@davidfowl
davidfowl / dotnetlayout.md
Last active July 12, 2025 16:21
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/