Skip to content

Instantly share code, notes, and snippets.

View jezao's full-sized avatar
🚀

Jefferson jezao

🚀
View GitHub Profile
@jezao
jezao / .php_cs.laravel.php
Created January 27, 2021 09:30 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null]
@jezao
jezao / reports.txt
Created November 27, 2020 01:25 — forked from zircote/reports.txt
phpcs report types
phpcs --standard=tests/build/phpcs.xml --report=summary .
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE ERRORS WARNINGS
--------------------------------------------------------------------------------
/usr/local/zend/apache2/htdocs/project/application/Bootstrap.php 1 4
...2/htdocs/Project/application/controllers/ActivityController.php 3 1
...
@jezao
jezao / User.php
Created August 14, 2018 20:11 — forked from bramnauta/User.php
app/User.php
<?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
jezao / ext.txt
Created May 22, 2018 20:34 — forked from chronon/ext.txt
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@jezao
jezao / how-to-set-up-stress-free-ssl-on-os-x.md
Created November 12, 2017 15:12 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
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
jezao / cryptographically_secure_random_strings.php
Created March 30, 2017 20:55 — forked from raveren/cryptographically_secure_random_strings.php
Generate cryptographically secure random strings. Based on Kohana's Text::random() method and this answer:http://stackoverflow.com/a/13733588/179104
function random_text( $type = 'alnum', $length = 8 )
{
switch ( $type ) {
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'hexdec':