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
<?php
namespace App\Http\Controllers\API;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class UsersController extends Controller
{
public function __construct()
<?php
if (!function_exists('applyActive')) {
function applyActive($route_name)
{
return (Route::current()->getName() === $route_name) ? 'active' : '';
}
}
if (!function_exists('isCurrentRoute')) {
<?php
namespace App\Http\Controllers;
use App\Video;
use Illuminate\Http\Request;
use App\Jobs\UploadVideoToVimeo;
class VideosController extends Controller
{
<?php
namespace App\Jobs;
use Vimeo;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@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.
Public Function rotateImage(filepath As String, Optional angleToRotate As Integer = 90) As Boolean

On Error GoTo handleError

    Dim WIA As Object
    Dim imageProcess As Object
    Dim FSO As FileSystemObject
    Dim originalFileName As String
    Dim newFileName As String
@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){
#!/bin/bash
laravel new $1
# Change Dir
cd $1
# Update .env
sed -i "s/APP_NAME=Laravel/APP_NAME=$1/g" .env
sed -i "s/DB_DATABASE=laravel/DB_DATABASE=$1/g" .env