Skip to content

Instantly share code, notes, and snippets.

View Braytiner's full-sized avatar
😎

Braytiner Braytiner

😎
  • Empresis Desenvolvimento de Sistemas
  • Nova Friburgo
  • 22:23 (UTC -03:00)
View GitHub Profile
@Braytiner
Braytiner / Windows Defender Exclusions VS 2019.ps1
Created November 19, 2021 14:59
Adds Windows Defender exclusions for Visual Studio 2019
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active April 25, 2024 18:03
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@Braytiner
Braytiner / TiposCamposDataAnnotations.cs
Last active February 7, 2020 13:54
Correlação de tipos e annotations do C# para tipos do MySql
/**********************************************************************************************************************************
Enumerados
**********************************************************************************************************************************/
//Preenchimento obrigatório, com valor menor que dez e valor default
[Column(TypeName = "tinyint(2) default 1")]
public Pessoa Pessoa { get; set; } = Pessoa.Juridica;
//Sem preenchimento obrigatório, com valor menor que dez
[Column(TypeName = "tinyint(2)")]
@Braytiner
Braytiner / gist:f2ef44b326b7021d74da4e63e7dbb333
Created January 30, 2020 20:08
ASP.net core auth cookie not being set in Google Chrome when running in dev
What you could try in Chrome is this: Open the developer-tools goto tab Application and in the left pane choose Clear storage.
Under the diagram on the right click Clear site data even if the usage shows 0 Bytes used. Do it anyway.
@Braytiner
Braytiner / gist:9c8191bb8e215fd7aab16f2cfb507aaa
Created May 16, 2019 14:59
Downloading Windows Spotlight Images via PowerShell command
Just create a folder on your desktop called Pics, open PowerShell and paste the following command press Enter:
Get-ChildItem -Path $env:localappdata\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets | Copy-Item -dest {"$home\desktop\pics\" + $_.BaseName + ($i++) +".jpg" }
All the images from the LocalState/Assets folder should be there in Pics folders. You’ll need to delete out the useless files, but
otherwise it saves you a lot of time. Enjoy!
@Braytiner
Braytiner / Windows Defender Exclusions VS 2019.ps1
Last active November 16, 2023 18:50 — forked from dknoodle/Windows Defender Exclusions VS 2017.ps1
Adds Windows Defender exclusions for Visual Studio 2019
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\source\repos') > $null
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio Services') > $null
$pathExclusions.Add($userPath + '\AppData\Local\GitCredentialManager') > $null
@Braytiner
Braytiner / theme.txt
Created February 18, 2019 11:37
Tema personalizado VS Code
"editor.tokenColorCustomizations": {
"[Visual Studio Dark]": {
"comments": "#444444",
"functions": "#AAAAAA",
"keywords": "#00AAAA",
// "numbers": "#009999",
"strings": "#BF7766",
"types": "#AAAAAA",
"variables": "#AAAAAA",
"textMateRules": [
This file has been truncated, but you can view the full file.
insert into ncm (id, codigo, ExcecaoTabelaIpi, uf, tipo, descricao, AliqNacional, AliqImportacao, AliqEstadual, AliqMunicipal) values
(00000000, "00000000", null, 33, 0, "PRODUTO NAO ESPECIFICADO NA LISTA DE NCM", 13.45, 15.45, 0.00, 0.00),
(01012100, "01012100", null, 33, 0, "Cavalos reprodutores,de raca pura", 4.20, 6.20, 14.00, 0.00),
(01012900, "01012900", null, 33, 0, "Cavalos vivos,exceto reprodutores de raca pura", 4.20, 6.94, 14.00, 0.00),
(01013000, "01013000", null, 33, 0, "Asininos", 4.20, 7.65, 6.84, 0.00),
(01019000, "01019000", null, 33, 0, "Outros asininos e muares,vivos", 4.20, 7.65, 6.84, 0.00),
(01022110, "01022110", null, 33, 0, "Bovinos reprodutores,de raca pura,prenhe ou com cria ao pe", 4.20, 6.20, 14.00, 0.00),
(01022190, "01022190", null, 33, 0, "Outros bovinos reprodutores,de raca pura", 4.20, 6.20, 14.00, 0.00),
(01022911, "01022911", null, 33, 0, "Outros bovinos para reprodução, prenhe ou com cria ao pe", 4.20, 6.94, 14.00, 0.00),
(01022919, "01022919", null, 33, 0,
insert into cstipi (id, descricao, operacao) values
(50, '50 – Saída tributada', 1),
(51, '51 – Saída tributável com alíquota zero', 1),
(52, '52 – Saída isenta', 1),
(53, '53 – Saída não tributada', 1),
(54, '54 – Saída imune', 1),
(55, '55 – Saída com suspensão', 1),
(99, '99 – Outras saídas', 1),
(00, '00 – Entrada com recuperação de crédito', 0),
(01, '01 – Entrada tributada com alíquota zero', 0),
INSERT INTO cstpis (id, descricao, operacao) VALUES
(01, '01 - Operação tributável com alíquota básica', 1),
(02, '02 - Operação tributável com alíquota diferenciada', 1),
(03, '03 - Operação tributável com alíquota por unidade de medida de produto', 1),
(04, '04 - Operação tributável monofásica - revenda a alíquota zero', 1),
(05, '05 - Operação tributável por substituição tributária', 1),
(06, '06 - Operação tributável a alíquota zero', 1),
(07, '07 - Operação isenta da contribuição', 1),
(08, '08 - Operação sem incidência da contribuição', 1),
(09, '09 - Operação com suspensão da contribuição', 1),