CI con .Net y GitHub Actions

Crear un archivo .yml en el directorio .github\workflows

vs code

Se deben definir las acciones, revisar la documentación para definir las acciones.

name: Integration

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Setup .NET SDK
        uses: actions/setup-dotnet@v1.7.2
        with:
          dotnet-version: 5.0.x

      - name: Restore
        run: dotnet restore

      - name: Build
        run: dotnet build --configuration Release --no-restore

      - name: Test
        run: dotnet test --no-restore

Al subir el archivo yml github actions ejecuta la compilacón del codigo.

github

Nullish coalescing operator

Is a binary operator that is part of the syntax for a basic conditional expression in several programming languages, the null coalescing operator generally returns the result of its left-most operand if it exists and is not null, and otherwise returns the right-most operand. This behavior allows a default value to be defined for cases where a more specific value is not available.

1
string pageTitle = suppliedTitle ?? "Default Title";

RabbitMQ

RabbitMQ is an open-source message-broker software that originally implemented the Advanced Message Queuing Protocol and has since been extended with a plug-in architecture to support Streaming Text Oriented Messaging Protocol, MQ Telemetry Transport, and other protocols.

Exclude a column using select all from table?

https://stackoverflow.com/questions/729197/sql-exclude-a-column-using-select-except-columna-from-tablea

Relevant answers:

If you want to exclude a sensitive case column like the password for example, I do this to hide the value :

SELECT * , "" as password FROM tableName;

A modern SQL dialect like BigQuery proposes an excellent solution

SELECT * EXCEPT(ColumnNameX, [ColumnNameY, ...])

This is a very powerful SQL syntax to avoid a long list of columns that need to be updated all the time due to table column name changes.

You could create a view that has the columns you wish to select, then you can just select * from the view.

Conventional Commits

The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.

The commit message should be structured as follows:

1
2
3
4
5
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Deshabilitar el tooltip de las pestañas de Google Chrome

A partir de la version 78 de chrome el navegador introdujo un tooltip para las tabs que incluye el titulo de la pagina y la dirección URL.
En el futuro este tooltip va a incluir una vista previa de la pagina abierta en la pestaña.

image

Si no estas comodo con este cambio aqui te mostrare como revertir a las tooltips clasicas de chrome.

Pasos para deshabilitar el nuevo tooltip.

  1. Abrir chrome y colocar la siguiente direccion en la barra de direcciones

    1
    chrome://flags/#tab-hover-cards
  2. Seleccionar lo opción deshabilitar de la lista que aparece.

image

  1. Cerrar, abrir el navegador y comprobar que el tooltip es el clasico.

image

Web Caching and Cache Busting

Cache busting is the process of uploading a new file to replace an existing file that is already cached. This is useful because the cache will often take a long time to expire from all of its various locations and cache busting properly ensures that any changes to a file be visible to end users sooner, rather than later.

Cache busting solves the browser caching issue by using a unique file version identifier to tell the browser that a new version of the file is available. Therefore the browser doesn’t retrieve the old file from cache but rather makes a request to the origin server for the new file.