Skip to content

Instantly share code, notes, and snippets.

View WyattCast44's full-sized avatar
👨‍🚀
Space is the place 🚀

Wyatt Castaneda WyattCast44

👨‍🚀
Space is the place 🚀
View GitHub Profile
@WyattCast44
WyattCast44 / Math.php
Created December 2, 2018 03:39 — forked from jgrossi/Math.php
Math class from Taylor Otwell. Thanks to @brad (captain_jim1@yahoo.com) for the class content.
<?php
class Math {
/**
* The base.
*
* @var string
*/
private static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@WyattCast44
WyattCast44 / laravel-passport-routes.v7.2.txt
Last active March 5, 2019 04:52
Just a nice reference for the routes registered by Laravels Passport Package
METHOD | URI | NAME | ACTION | MIDDLEWARE(S)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GET|HEAD | oauth/authorize | passport.authorizations.authorize | Laravel\Passport\Http\Controllers\AuthorizationController@authorize | web,auth
POST | oauth/authorize | passport.authorizations.approve | Laravel\Passport\Http\Controllers\ApproveAuthorizationController@approve | web,auth
DELETE | oauth/authorize | passport.authorizations.deny | Laravel\Passport\Http\Controllers\DenyAuthorizationController@deny | web,auth
GET|HEAD | oauth/clients | passport.clients.index | Laravel\Passport\Http\Controllers\Cl
GET index
GET create
POST store
GET show
GET edit
PUT/PATCH update
DELETE destroy
@WyattCast44
WyattCast44 / google-example.php
Created March 17, 2019 06:18 — forked from fillup/google-example.php
Example of using Google Admin SDK Directory API to get an individual or list of users.
<?php
// Updated 2018-01-24 to work with google/apiclient:^2.0
/*
* Easiest to use composer to install google-api-php-client and generate autoloader
* If you dont want to use composer you can manually include any needed files
*/
include_once 'vendor/autoload.php';
/*
* Email address for admin user that should be used to perform API actions
<?php
namespace App\GSuite;
use Google_Client;
use Google_Service_Directory;
class GSuite
{
// TODO: To be continued...
<?php
namespace App\OAuth;
use Exception;
use Illuminate\Support\Arr;
use Laravel\Socialite\Two\User;
use Laravel\Socialite\Two\AbstractProvider;
use Laravel\Socialite\Two\ProviderInterface;
<?php
namespace App\Providers;
use App\OAuth\Provider;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use Socialite;
use App\Http\Controllers\Controller;
class ProviderLoginController extends Controller
{
@WyattCast44
WyattCast44 / error_blade_directive.php
Created March 30, 2019 18:30 — forked from calebporzio/error_blade_directive.php
A little Blade directive to make working with validation errors a bit nicer.
<?php
// Usage:
// Before
@if ($errors->has('email'))
<span>{{ $errors->first('email') }}</span>
@endif
// After:
@WyattCast44
WyattCast44 / embedded-file-viewer.md
Created March 31, 2019 04:24 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links