Skip to content

Instantly share code, notes, and snippets.

View lincolnbrito's full-sized avatar

Lincoln Brito lincolnbrito

View GitHub Profile
@lincolnbrito
lincolnbrito / outbound-email-with-cloudflare.md
Created April 19, 2025 18:37 — forked from irazasyed/outbound-email-with-cloudflare.md
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@lincolnbrito
lincolnbrito / ddd_cqrs_event-sourcing_in_php.md
Created December 13, 2023 18:15 — forked from jsor/ddd_cqrs_event-sourcing_in_php.md
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@lincolnbrito
lincolnbrito / .bashrc
Last active February 23, 2019 00:58
Install Phonegap/Cordova + Android on Linux Mint
export PATH=$PATH:/usr/lib/gradle/5.2/bin
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=${PATH}:${ANDROID_HOME}/platform-tools/bin:${ANDROID_HOME}/tools/bin
@lincolnbrito
lincolnbrito / UsersControllerTest.php
Created August 10, 2018 03:03
Testing login actions CakePHP 3
<?php
namespace App\Test\TestCase\Controller;
use App\Controller\UsersController;
use Cake\Auth\WeakPasswordHasher;
use Cake\TestSuite\IntegrationTestCase;
/**
* App\Controller\UsersController Test Case
*/
@lincolnbrito
lincolnbrito / README.md
Last active August 9, 2018 03:07
A simple jQuery+CakePHP3 service architecture

How to use

Enable resources and add extension on routes.php

<?php

...

Router::scope('/', function (RouteBuilder $routes) {
 $routes-&gt;addExtensions(['json']);

Shortcut to open Cmder in a chosen folder

  1. Open a terminal as an Administrator
  2. Navigate to the directory you have placed Cmder
  3. Execute .\cmder.exe /REGISTER ALL If you get a message "Access Denied" ensure you are executing the command in an Administrator prompt.

In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu.

Tasks

@lincolnbrito
lincolnbrito / .bash_profile
Last active November 16, 2017 14:11
Create a Docker alias in Git Bash Windows
alias vue='docker run -it --rm -v "/$PWD:/var/www/app" ambientum/vue-cli vue'
alias node='docker run -it --rm -v "/$PWD:/home" -w=//home node:slim node'
alias npm='docker run -it --rm -v "/$PWD:/home" -w=//home node:slim npm'
@lincolnbrito
lincolnbrito / FirstStop.php
Last active July 22, 2019 05:41
How to use pipelines in Laravel
<?php
namespace App\Pipelines\Stops;
use Closure;
class FirstStop
{
protected $data;
public function handle($data, Closure $next){
@lincolnbrito
lincolnbrito / 01-render.php
Last active July 6, 2016 15:46
Output/Render a JasperReport with PHP
<?php
/**
* Output a JasperReport in PDF format and show on browser
*/
include_once "vendor/autoload.php";
use JasperPHP\JasperPHP;
//report.jrxml
$reportFileName = "report";
$reportFileExt = ".jrxml";