Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Erik Figueiredo erikfig

🏠
Working from home
View GitHub Profile
View gist:704794a6ad9be4dd458b8f122433f07f
<?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');
View gist:7a852ca266900f8375412436bfe48782
# 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
View auth.js
export function getToken() {
return new Promise((resolve) => resolve('token'))
}
View gist:d2899b1b24de4b6bc371619ee79ebca8
<?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';
View gist:121371775e68ada25aaf1ba468ac76d6
<?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';
View bitbucket-pipelines.yml
pipelines:
branches:
master:
- step:
name: "Deploy"
script:
- apt-get update -y
- apt-get install -y ssh
- echo "Deploying to environment"
- ssh -i ~/.ssh/config usuario@servidor "git --git-dir=/diretorio/do/repositorio/git/bare fetch origin master:master; GIT_WORK_TREE=/aonde/os/arquivos/vao/ficar/no/servidor/ git --git-dir=/diretorio/do/repositorio/git/bare checkout master -f; cd /aonde/os/arquivos/vao/ficar/no/servidor/; composer install; php artisan migrate; npm run prod"
View gist:5dbf2dd365c95d66439e3d21fcaf3e93
<?php
/**
* Created by PhpStorm.
* User: honorato
* Date: 09/08/19
* Time: 08:31
*/
namespace Modules\ContasAPagar\Http\Requests;
View gist:97f5c6226a25c38651ace38b6f77deb6
<?php
namespace App\Client;
class Client
{
protected $token;
protected handler()
{
$client = new Client();
View gist:412b6a897b3c91e09cb5425d8d1807a7
{
field: 'bancos_bacen_id',
label: 'Banco',
type: 'select-server',
action: 'bancos/getData',
rules: [v.required],
class: 'col-6',
onChange() {},
},
View gist:88316333b9307bf8ec829a77eae8af11
'QLayout',
'QHeader',
'QDrawer',
'QPageContainer',
'QPage',
'QToolbar',
'QToolbarTitle',
'QBtn',
'QIcon',