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 / 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
@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

@WyattCast44
WyattCast44 / Push.php
Created June 13, 2019 03:45 — forked from rufhausen/Push.php
Laravel Artisan command for pushing to remotes via git
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class Push extends Command {
/**
* The console command name.
@WyattCast44
WyattCast44 / aux-functions.php
Created March 21, 2020 21:56 — forked from eduwass/aux-functions.php
Programmatically adding a Page item to a Wordpress nav menu
<?php
/**
* Adds Page to a WordPress navmenu
* @param [int] $page_id The ID of the page you want to add
* @param [str] $page_title Title of menu item
* @param [int] $menu_id NavMenu ID
* @param [int] $parent (Optional) Menu item Parent ID
*/
function add_page_to_menu($page_id, $page_title, $menu_id, $parent = 0){