Skip to content

Instantly share code, notes, and snippets.

View sanchesfranklin's full-sized avatar

Sanches Santos sanchesfranklin

View GitHub Profile
@sanchesfranklin
sanchesfranklin / gist:9022208667eba92c5da5710879cdd843
Created July 26, 2022 01:44
código para publicar uma aplicação dotnet
dotnet publish --configuration Release
@sanchesfranklin
sanchesfranklin / gist:b0bce167f85f3d2d94186ff8d4dfa2e7
Created July 26, 2022 01:47
Arquivo de configuração NgInx .net 6
server {
listen 80;
server_name example.com *.example.com;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
@sanchesfranklin
sanchesfranklin / gist:cfde79d22b0900d18db948f03e4f52f7
Last active July 26, 2022 02:38
serviço asp net core kestrel
[Unit]
Description=Example .NET Web API App running on Ubuntu
[Service]
WorkingDirectory=/var/www/testeWebApiLinux
ExecStart=/usr/bin/dotnet /var/www/testeWebApiLinux/testeWebApiLinux.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
{
"empresa":"5008",
"data_inicial":null,
"data_final":null,
"chave_nf":null
}
{
"empresa":"5008"
}
@sanchesfranklin
sanchesfranklin / gist:a54d4c3bb33ce5b4e6d29989418e559f
Last active October 11, 2022 01:00
funcao_retirarNulls_formReativo_Angular
retiraCamposNullForm(){
Object.keys(this.formIntegracao.controls).forEach(el =>{
if (this.formIntegracao.controls[el].value === null){
this.formIntegracao.controls[el].disable();
}
});
}
habilitaCamposForm(){
Object.keys(this.formIntegracao.controls).forEach(el => {
this.formIntegracao.controls[el].enable();
});
}