Skip to content

Instantly share code, notes, and snippets.

View mvrmoreira's full-sized avatar

Matheus Moreira mvrmoreira

View GitHub Profile
@mvrmoreira
mvrmoreira / notification.json
Last active April 6, 2020 13:58
Repayment notification
{
"policy_id": "591b41b4-6692-4a03-9683-21621ea29d98",
"transfer_id": "27045216-51be-4863-860e-205097f3e6dc",
"policy_type": "operation_retention",
"operation_type": "inbound_card_payment",
"card_network_code": "234",
"acquirer": "cielo",
"is_prepayment": false,
"date": "2020-12-31",
"amount": 1543789,
@mvrmoreira
mvrmoreira / Loan.cs
Last active July 30, 2019 20:30
GoogleBigQuerySpike
using System;
using System.Collections.Generic;
using Google.Cloud.BigQuery.V2;
namespace GoogleBigQuerySpike
{
public class Loan
{
public string Id { get; set; }
using Nancy;
namespace Nala
{
public class NalaModule : NancyModule
{
public NalaModule()
{
Get["/"] = parameters => "Hi, I'm a pretty dog!";
}
using Mono.Unix;
using Mono.Unix.Native;
using Nancy.Hosting.Self;
using System;
namespace Nala
{
class Program
{
static void Main(string[] args)
@mvrmoreira
mvrmoreira / mundipagg.gpg
Created January 31, 2017 13:36
MundiPagg GPG Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQINBFiQka4BEACYtCtdEUqK+3yojMroaOJvsz+XSR0mQvg97GGHY+e0zG/qiq9b
qIUTrBvTnR8Wqq5gxXQqkiKL38upMSKjSPfPmI14D1uiTTftjRMVcTfGLoSV/Euu
Bx69Wx8B0NN1bOeQP9oWvRAGYAIQsG1blE32+iUJZwRESleRXaTKplRKcAcXnhnM
sZoAqN5N92RCqgq7wMimLZs0E9Ug3FR9ula5I1jhlozRu105Zd2OwM5NDtj5Jnt/
CvLOUUMkO+2GFSC0kD6bgkr6pjCuzQTEHgWi6xRyE87mGt4Dhy83rBpYAAI6EJwz
GrX+a/FyOQRKBfU6swhyQT8cI8bdkyPXWS/S5FOhQMi0rc7o3BqhEGbLsKa6Eh7T
2+u5T1Zv7lrz4aOFKzHnIHphgZr7Qe5X7TDCQAkZFPWi3xQqxF8CIJ4ssX6UiW6W
<?php
// RECEBE OS DADOS DO MEDIDOR
$vazao = $_REQUEST['vazao'];
// TODO: FAZER A LOGICA QUE VAI DECIDIR SE DISPARA OU NAO O EMAIL
// MONTA E CONFIGURA O EMAIL A SER ENVIADO
require 'vendor/autoload.php';

Keybase proof

I hereby claim:

  • I am mvrmoreira on github.
  • I am mvrmoreira (https://keybase.io/mvrmoreira) on keybase.
  • I have a public key whose fingerprint is 5EFA 0AA7 3AB2 0459 47F4 C709 5C15 A5D1 69A9 E4C5

To claim this, I am signing this object:

@mvrmoreira
mvrmoreira / _request.php
Last active August 29, 2015 14:22
Consumindo uma API com SSL usando o cURL
<?php
// Cria instância co cURL
$ch = curl_init();
// Define a url
curl_setopt($ch, CURLOPT_URL, "https://api.stone.com.br");
// Habilita a verificação de SSL
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
@mvrmoreira
mvrmoreira / DbSetMock.cs
Last active August 29, 2015 14:20
DbSetMock
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
namespace Billing.Tests.Models
{
public class DbSetMock<T> : DbSet<T>, IQueryable, IEnumerable<T>
@mvrmoreira
mvrmoreira / gist:8224bd4143f256b569ac
Created March 9, 2015 21:33
Método que veirica se a string passada está no formado +x55(x21)9999999999
/// <summary>
/// Método que veirica se a string passada está no formado +x55(x21)9999999999
/// </summary>
/// <param name="phoneNumber"></param>
/// <returns></returns>
public bool CheckPhoneMask(string phoneNumber) {
bool returnValue = StringUtility.IsARegexMatch(@"^(?<DDI>\+?[0-9]{1,3})?\((?<DDD>[0-9]{1,3})\)(?<NUMBER>[0-9]{1,9})$", phoneNumber.Replace("-", ""));
return returnValue;
}