Skip to content

Instantly share code, notes, and snippets.

Working from home

Jefferson jezao

Working from home
View GitHub Profile
jezao / .php_cs.laravel.php
Created Jan 27, 2021 — forked from laravel-shift/.php_cs.laravel.php
PHP CS Fixer - Laravel Coding Style Ruleset
View .php_cs.laravel.php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null]
jezao / reports.txt
Created Nov 27, 2020 — forked from zircote/reports.txt
phpcs report types
View reports.txt
phpcs --standard=tests/build/phpcs.xml --report=summary .
/usr/local/zend/apache2/htdocs/project/application/Bootstrap.php 1 4
...2/htdocs/Project/application/controllers/ActivityController.php 3 1
jezao /
Last active Nov 8, 2020
Hardening server

Hardening Servers

The objective of this manual is to create a security standard in our infrastructure setup. For this guide, we will use the Chef Inspec to run our setup tests + Dev sec hardening framework automated with Ansible


Centos 7+ yum -y install ruby ruby-devel make gcc gcc-c++ git curl

jezao / User.php
Created Aug 14, 2018 — forked from bramnauta/User.php
View User.php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
jezao / ext.txt
Created May 22, 2018 — forked from chronon/ext.txt
List of docker-php-ext-install extension names
View ext.txt
Possible values for ext-name:
jezao / traduzErroPagseguro.php
Last active Mar 9, 2021
Pagseguro - Lista de erros traduzidos
View traduzErroPagseguro.php
public function translateError($code)
case "5003": $err = "Falha de comunicação com a instituição financeira"; break;
case "10000": $err = "Marca de cartão de crédito inválida"; break;
case "10001": $err = "Número do cartão de crédito com comprimento inválido"; break;
case "10002": $err = "Formato da data inválida"; break;
jezao /
Created Nov 12, 2017 — forked from jed/
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

jezao / bancosbrasil.json
Created Apr 10, 2017
Lista de bancos brasil JSON
View bancosbrasil.json
[{"id":1, "code":0, "bank":"Banco de Desenvolvimento do Estado de Santa Catarina S.A.", "featured":0, "active":0},
{"id":2, "code":654, "bank":"Banco A.J.Renner S.A.", "featured":0, "active":1},
{"id":3, "code":246, "bank":"Banco ABC Brasil S.A.", "featured":0, "active":1},
{"id":4, "code":75, "bank":"Banco CR2 S.A.", "featured":0, "active":1},
{"id":5, "code":121, "bank":"Banco Agiplan S.A.", "featured":0, "active":1},
{"id":6, "code":0, "bank":"Banco Alfa de Investimentos S.A.", "featured":0, "active":0},
{"id":7, "code":25, "bank":"Banco Alfa S.A.", "featured":0, "active":1},
{"id":8, "code":641, "bank":"Banco Alvorada S.A.", "featured":0, "active":1},
{"id":9, "code":65, "bank":"Banco Patagon S.A.", "featured":0, "active":1},
{"id":10, "code":213, "bank":"Banco Arbi S.A.", "featured":0, "active":1},
jezao / simplehttp.php
Last active Mar 31, 2017
Make a GET/POST request with CURL in PHP
View simplehttp.php
function simplehttp($method,$url,$data = [], $options = [],$headers=[])
$method = strtoupper($method);
$url = ( $method == 'GET' && sizeof($data) > 0) ? $url .= "?" . http_build_query($data) : $url;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if($method == 'POST') {
curl_setopt($ch, CURLOPT_POST, 1);
jezao / cryptographically_secure_random_strings.php
Created Mar 30, 2017 — forked from raveren/cryptographically_secure_random_strings.php
Generate cryptographically secure random strings. Based on Kohana's Text::random() method and this answer:
View cryptographically_secure_random_strings.php
function random_text( $type = 'alnum', $length = 8 )
switch ( $type ) {
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
case 'hexdec':