Skip to content

Instantly share code, notes, and snippets.

View andre-f-paggi's full-sized avatar

André Franciscato Paggi andre-f-paggi

View GitHub Profile
Just add %AppData%\npm; to the user variable(since %AppData% dir is depending on user) PATH to fix it.
@andre-f-paggi
andre-f-paggi / visual-studio-2015-extensions.txt
Last active September 28, 2017 21:13
List of all VS2015 extensions that I currently use at work. How to get this info "Help > About > GetInfo"
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01590
Installed Version: Enterprise
Architecture and Modeling Tools 00322-80000-00000-AA784
Microsoft Architecture and Modeling Tools
@andre-f-paggi
andre-f-paggi / regex-cep.js
Created October 10, 2017 20:32
Regex para CEPs
var regexCep = /^\d{5}\-?\d{3}$/;
function Cep(cep) {
// constructor
this._cep = cep;
this.cepEhValido = cepEhValido;
this.comPontos = comPontos;
this.semPontos = semPontos;
if (cep)
_lancarExcecaoSeCepForInvalido(cep);
@andre-f-paggi
andre-f-paggi / configurar-open-command-line-extensions-on-vs2017.txt
Created October 11, 2017 13:50
Configura Open Command Line Extension do Visual Studio 2017 para abrir Cmder na pasta informada
/c "C:\tools\cmder\Cmder.exe /start %folder%"
@andre-f-paggi
andre-f-paggi / .gitconfig
Last active April 20, 2018 15:42
Mine .gitconfig file
[user]
name = André Franciscato Paggi
email = [email protected]
[diff]
tool = tortoisediff
[difftool]
prompt = false
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2018-04-16 11:28:54" build="180206">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{cmd::Cmder}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@andre-f-paggi
andre-f-paggi / dbForge SQL Complete Config.xml
Created April 17, 2018 17:25
dbForge SQL Complete Config
<FormatProfile Name="Default" LanguageId="{3e02aa62-f0e5-43bf-ae87-c70419725a15}">
<FormatOptions>
<PropertyValue Name="Select_SingleLine_WhenRightMarginIsNotExceeded">false</PropertyValue>
<SubOptions Name="Select_SingleLine_WhenQueryIsShorterThanXCharacters">
<PropertyValue Name="Checked">false</PropertyValue>
<PropertyValue Name="Value">50</PropertyValue>
</SubOptions>
<SubOptions Name="Select_SingleLine_WhenQueryContainsLessThanXWords">
<PropertyValue Name="Checked">false</PropertyValue>
<PropertyValue Name="Value">10</PropertyValue>
@andre-f-paggi
andre-f-paggi / repo.cs
Created April 30, 2018 21:50
MultiMapping Dapper + AutoMapper - .Net Core
public CompraParaAprovarPagamentoDTO ObterCompraParaAprovarPagamentoDTO(int idCompra)
{
using (SqlConnection conexao = new SqlConnection(_config.GetConnectionString("DbLoja")))
{
var sql = $@"
select
'IdCompra' = Compra.IdCompra,
'Pagamentos_Sequencial' = CompraFormaPagamento.Sequencial,
'Pagamentos_ValorJuros' = (select sum(CompraFormaPagamento.ValorJuros) from CompraFormaPagamento CFP where CFP.IdCompraFormaPagamento = CompraFormaPagamento.IdCompraFormaPagamento),
'Pagamentos_ValorMeioPagamento' = (select sum(CompraFormaPagamento.ValorComJuros) from CompraFormaPagamento CFP where CFP.IdCompraFormaPagamento = CompraFormaPagamento.IdCompraFormaPagamento),
@andre-f-paggi
andre-f-paggi / SerializeObjToJson.cs
Created October 1, 2018 14:18
Serialize C# object to JSON in immediate window
Newtonsoft.Json.JsonConvert.SerializeObject(myObj, Newtonsoft.Json.Formatting.None, new Newtonsoft.Json.JsonSerializerSettings(){ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore })