Skip to content

Instantly share code, notes, and snippets.

View akbortoli's full-sized avatar

Alysson Bortoli akbortoli

  • Auckland, New Zealand
View GitHub Profile
@akbortoli
akbortoli / Base64 Encode Image
Last active February 25, 2019 01:47
PHP: Base64 encode image
<?php
/**
* @param string $path
* @param string $type
*/
function base64_encode_image ($path, $type)
{
$binary = fread(fopen($path, 'rb'), filesize($path));
@akbortoli
akbortoli / gist:5447480
Created April 23, 2013 21:17
Shell: Function and Flags
#!/bin/bash
function help ()
{
echo "A simple script."
echo ""
echo " ./test.sh abc - include jasmine in the project";
}
function abc()
@akbortoli
akbortoli / .php_cs.laravel.php
Created July 2, 2020 21:05 — 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]