Skip to content

Instantly share code, notes, and snippets.

View scottybo's full-sized avatar
🎯
Focusing

Scott Bowler scottybo

🎯
Focusing
  • DCS Digital
  • UK
View GitHub Profile
@scottybo
scottybo / Functions.php
Last active July 10, 2023 09:36
Adaptation to Radius Themes variation output to attempt to use a variation image
<?php
namespace Rtwpvs\Helpers;
class Functions {
static function write_log($log) {
if (true === WP_DEBUG) {
if (is_array($log) || is_object($log)) {
error_log(print_r($log, true));
@scottybo
scottybo / Provider.php
Created June 4, 2018 17:55
Socialite Wordpress Self Hosted
<?php
namespace SocialiteProviders\WordPress;
use SocialiteProviders\Manager\OAuth2\User;
use Laravel\Socialite\Two\ProviderInterface;
use SocialiteProviders\Manager\OAuth2\AbstractProvider;
class Provider extends AbstractProvider implements ProviderInterface
{
@scottybo
scottybo / permissions.md
Last active May 30, 2018 16:07
User permissions

Introduction

New to ACL? To learn about Access Control Lists and common terminology, visit: https://en.wikipedia.org/wiki/Access_control_list

TODO

  • Design Kiosk GUI for managing Roles and Permissions
  • Implement GUI using Vue/Blades/Routes/Controllers etc
  • Add seed file for creating default Roles and Permissions
    • System admin (sysadmin)
    • Whitelabel admin (admin)
    • Default user (member)
@scottybo
scottybo / calendar.js
Created May 14, 2018 13:19
Calendar JS
// Components
import flatPickr from 'vue-flatpickr-component';
import 'flatpickr/dist/flatpickr.css';
// Schemas
const normalizr = require('normalizr');
const categorySchema = new normalizr.schema.Entity('categories');
const categoriesSchema = [ categorySchema ];
const accountSchema = new normalizr.schema.Entity('accounts');
@scottybo
scottybo / calendar.blade.php
Created May 14, 2018 13:18
Calendar Blade
@extends('spark::layouts.app')
@section('title', __("Post Calendar - :appname", ['appname' => config('app.name')]))
@section('content')
<calendar :user="user" inline-template>
<div class="container-fluid">
<div class="container" id="post-calendar">
<div class="row">
<div class="col-md-6">
<h1 class="page-heading" >{{ __("Post Calendar") }}</h1>
<h4>