Skip to content

Instantly share code, notes, and snippets.

View souzagustavo's full-sized avatar
🎯
Focusing

Gustavo Souza souzagustavo

🎯
Focusing
  • Superdigital
  • São Paulo, BR
View GitHub Profile
@lohhans
lohhans / README-PTBR.md
Last active July 19, 2024 20:41 — forked from PurpleBooth/README-Template.md
Um modelo para fazer um bom README.md

Título do projeto

Um parágrafo da descrição do projeto vai aqui

🚀 Começando

Essas instruções permitirão que você obtenha uma cópia do projeto em operação na sua máquina local para fins de desenvolvimento e teste.

Consulte Implantação para saber como implantar o projeto.

@fugaku
fugaku / WorkerHostedService.cs
Created September 4, 2018 15:35
Worker Hosted Service
public class WorkerHostedService : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stopToken)
{
//Do your preparation (e.g. Start code) here
while (!stopToken.IsCancellationRequested)
{
await DoSomethingAsync();
}
//Do your cleanup (e.g. Stop code) here
@fugaku
fugaku / BackgroundService.cs
Last active March 31, 2020 20:41
BackgroundService for long running
public abstract class BackgroundService : IHostedService, IDisposable
{
private Task _executingTask;
private readonly CancellationTokenSource _stoppingCts = new CancellationTokenSource();
protected abstract Task ExecuteAsync(CancellationToken stoppingToken);
public virtual Task StartAsync(CancellationToken cancellationToken)
{
// Store the task we're executing
@lfgrando
lfgrando / RecoverDeadLetterQueuesGeneric.cs
Created August 27, 2018 14:28
RecoverDeadLetterQueuesGeneric
using Microsoft.ServiceBus.Messaging;
using System;
using System.Configuration;
namespace RecoverDeadLetterQueuesGeneric
{
class Program
{
static void Main(string[] args)
{
@lfgrando
lfgrando / SetApiMaxContentLengthUpload.xml
Last active August 31, 2018 14:57
API Upload Limit Size to 1gb at Web.config. It seems it doesn't work at all IIS's. Looks like not working at IIS Express.
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>