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 / CommunityLinksQuery.php
Created August 18, 2019 00:06 — forked from JeffreyWay/CommunityLinksQuery.php
Consider Query Objects source.
<?php
namespace App\Queries;
use App\CommunityLink;
class CommunityLinksQuery
{
/**
* Fetch all relevant community links.
@oliuz
oliuz / routes.php
Created August 18, 2019 00:06 — forked from JeffreyWay/routes.php
This route will require authentication with a valid api_token, and then return the relevant user, as JSON. - https://laracasts.com/series/whats-new-in-laravel-5-2/episodes/5
<?php
Route::group([
'prefix' => 'api/v1',
'middleware' => ['api', 'auth:api']
], function () {
Route::get('/', function () {
return Auth::guard('api')->user();
});
@oliuz
oliuz / countries.php
Created August 18, 2019 00:07 — forked from JeffreyWay/countries.php
Country Names + Codes
[
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",
@oliuz
oliuz / ex.php
Created August 18, 2019 00:07 — forked from JeffreyWay/ex.php
Access Laravel from a test that uses the Integrated Selenium extension. https://github.com/laracasts/integrated
use Laracasts\Integrated\Extensions\Selenium;
use Laracasts\Integrated\Services\Laravel\Application as Laravel;
class AuthTest extends Selenium
{
use Laravel;
/**
* @tearDown
@oliuz
oliuz / timer_helpers.php
Created August 18, 2019 00:07 — forked from calebporzio/timer_helpers.php
A simple helper function and macro for timing php scripts and eloquent queries
<?php
// Helper function.
if (! function_exists('timer')) {
function timer($expression)
{
$start = microtime(true);
if ($expression instanceof Closure) {
$expression();
@oliuz
oliuz / amount_in_dollars.php
Created August 18, 2019 00:07 — forked from calebporzio/amount_in_dollars.php
A handy accessor and mutator for storing amounts in cents and accessing and setting them in dollars
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class [Insert Name Here] extends Model
{
protected $guarded = [];
@oliuz
oliuz / lifegame.vue
Created April 20, 2020 17:41 — forked from nyk510/lifegame.vue
Vue.js Lifegame (220 lines)
<template>
<v-container>
<v-layout align-center>
<v-btn
:disabled="!!taskId"
depressed
class="ma-0"
@click="onClickPlay">
<v-icon>play_arrow</v-icon>
</v-btn>
@oliuz
oliuz / AppServiceProvider.php
Created April 29, 2020 21:32 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@oliuz
oliuz / gist:d034e8d3acc7d9241ebf72f9089c1022
Created May 2, 2020 14:17 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@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
{
//...