Skip to content

Instantly share code, notes, and snippets.

View erikfig's full-sized avatar
🏠
Working from home

Erik Figueiredo erikfig

🏠
Working from home
View GitHub Profile
<samlp:AuthnRequest AssertionConsumerServiceURL="https://saml-sp.repro.lab/cgi/samlauth"
Destination="https://saml-redirect.repro.lab/saml/login" ForceAuthn="false"
ID="_59d52136c277a2ae101124b8e40142bf" IssueInstant="2018-01-25T08:55:22Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://netscaler.repro.lab</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod>
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="ONELOGIN_424759b48c2d86c3fccb57821ddac32a2f948513"
Version="2.0"
ProviderName="Display Name"
IssueInstant="2020-05-22T13:08:23Z"
Destination="https://idp-saml.ambev.com.br/saml2/idp/SSOService.php"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
AssertionConsumerServiceURL="https://digitaltrade.ambevdevs.com.br/prod/saml2/ambev/acs">
import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import Table from '../Table'
import MobileTable from '../MobileTable'
import Button from '../Button'
import RegisterUser from '../../containers/Register/RegisterUser'
import { Container, WrapperAddUser } from './styles'
const useViewport = () => {
const number = 123456999.789;
let numberFormated = new Intl.NumberFormat('pt-BR', { style: 'decimal', minimumFractionDigits: 2, maximumFractionDigits :2}).format(number);
console.log(numberFormated.replace(/\./g, '').replace(',', '.'))
const number = 123456.789;
const formatter = new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' });
https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
<?php
// If you choose to use ENV vars to define these values, give this IdP its own env var names
// so you can define different values for each IdP, all starting with 'SAML2_'.$this_idp_env_id
$this_idp_env_id = 'AMBEV';
//This is variable is for simplesaml example only.
// For real IdP, you must set the url values in the 'idp' config to conform to the IdP's real urls.
$idp_host = env('SAML2_'.$this_idp_env_id.'_IDP_HOST', 'https://idp-saml.ambev.com.br/saml/login');
# rodar os comandos
pecl install xdebug
docker-php-ext-enable xdebug
#adicionar no arquivo a baixo
/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# o seguinte, SEM SUBSTITUIR NADA
xdebug.remote_enable=on
export function getToken() {
return new Promise((resolve) => resolve('token'))
}
<?php
use ErikFig\CnabWriter\Entities\Header;
use ErikFig\CnabWriter\Entities\Rem\Boleto\BatchTrailer;
use ErikFig\CnabWriter\Entities\Rem\Boleto\Header as BoletoHeader;
use ErikFig\CnabWriter\Entities\Rem\Boleto\SegmentJ;
use ErikFig\CnabWriter\Entities\Rem\Boleto\SegmentJ52;
use ErikFig\CnabWriter\Entities\Trailer;
include __DIR__ . '/vendor/autoload.php';
<?php
$data = scandir(__DIR__);
foreach ($data as $sub) {
if (is_dir(__DIR__ . DIRECTORY_SEPARATOR . $sub)) {
echo $sub . ' is a dir';
if (preg_match('/[0-9]{3}/', $sub)) {
echo ' and is a bank code';