Skip to content

Instantly share code, notes, and snippets.

View oliuz's full-sized avatar
💻
Coding!

Jose Rosado oliuz

💻
Coding!
View GitHub Profile
@oliuz
oliuz / Permission.php
Created July 6, 2022 15:54 — forked from lamberttraccard/Permission.php
Middleware Permission to dynamically authorize users for spatie/laravel-permission
<?php
namespace App\Http\Middleware;
use App\Exceptions\UnauthorizedException;
use App\Http\Controllers\UsersController;
use Closure;
class Permission
{
@oliuz
oliuz / LARAVEL_lumen.md
Created May 11, 2021 12:24 — forked from satoblacksato/LARAVEL_lumen.md
Apuntes y primeros pasos con LUMEN (Microframework de Laravel)

Lumen

Lumen es un micro-framework para PHP.

Lumen es una versión más liviana de Laravel y orientado más a la creación de APIs y microservicios, aunque también puedes usarlo para crear sitios web o lo que quieras.

Si es posible migrar de Lumen a Laravel

Microservicios:

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Post extends Model
{
public static function boot()
@oliuz
oliuz / technical_test.php
Created March 27, 2021 02:09 — forked from hersan/technical_test.php
evaluación técnica para reclutamiento 11
<?hp
/*****************************
*
* Prueba para reclutamiento 11
*
******************************/
//P1
function weight_word($string) {
@oliuz
oliuz / ReportFactory
Created March 27, 2021 02:09 — forked from hersan/ReportFactory
Ejemplo de implementación del Patrón Factory
<?php
namespace App\Services;
use Illuminate\Foundation\Application;
class ReportFactory
{
private $app;
@oliuz
oliuz / index.html
Created June 22, 2020 10:54 — forked from edwardlorilla/index.html
multiple filter vuejs
<div id="app">
<fieldset>
<legend>price</legend>
{{start}}
<input type="range" v-model="start" :min="min" :max="max" >
{{end}}
<input type="range" v-model="end" :min="min" :max="max">
</fieldset>
<fieldset>
<legend>color</legend>
@oliuz
oliuz / Image.php
Created June 19, 2020 15:02 — forked from stivenson/Image.php
Clase php para operaciones sobre una imagen en base64 o en Archivo
<?php
namespace Helpers; // Optional
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
@oliuz
oliuz / OperationsDate.php
Created June 19, 2020 15:01 — forked from stivenson/OperationsDate.php
Clase para operaciones sobre fechas
<?php
namespace Helpers;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*
*/
@oliuz
oliuz / aprobar-pull-request-bitbucket.adoc
Created June 9, 2020 20:52 — forked from domingogallardo/aprobar-pull-request-bitbucket.adoc
Flujo de trabajo con Git para gestionar y aprobar un Pull Request (PR) en un repositorio remoto compartido en Bitbucket

Veamos un flujo de trabajo con Git para gestionar y aprobar un Pull Request (PR) en un repositorio remoto compartido. El flujo de trabajo se ha comprobado que funciona correctamente en repositorios remotos gestionados en Bitbucket.

Suponemos un equipo formado por 3 desarrolladores (Ana, Lucía y Carlos) que están trabajando sobre un repositorio compartido utilizando el flujo de trabajo denominado Gitflow (ver el post de Vicent Driessen). En la rama develop se integran las features que se van desarrollando en ramas independientes.

Se ha definido la política de que antes de integrar una rama de característica se debe realizar un Pull Request en Bitbucket y algún otro miembro del equipo debe comprobar su funcionamiento y dar el visto bueno. La integración la realizará el mismo desarrollador que ha creado el Pull Request. Aunque Bitbucket proporciona la opción de cerrar el PR desde la interfaz web, utilizaremos comandos Git en e

@oliuz
oliuz / Kernel.php
Created May 29, 2020 02:41 — forked from JuanDMeGon/Kernel.php
A small Laravel command to collect the sessions garbage if applicable to the current session driver
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
//...