Skip to content

Instantly share code, notes, and snippets.

View kellymears's full-sized avatar

Kelly Mears kellymears

View GitHub Profile
@kellymears
kellymears / gutenberg-graphql-schema.txt
Created October 3, 2019 21:00 — forked from kellenmace/gutenberg-graphql-schema.txt
WordPress Gutenberg GraphQL Schema Definitions
type CoreArchivesBlock implements Block {
attributes: CoreArchivesBlockAttributes
name: String!
innerBlocks: [Block]!
isValid: Boolean!
originalContent: String!
parentId: Int
parent: PostObjectTypesUnion
renderedContent: String!
}
// @wordpress
import {RawHTML} from '@wordpress/element'
// @react-moment
import Moment from 'react-moment'
// exports
const Card = ({featuredImage, title, date}) => (
<div className={`my-1 px-1 w-full md:w-1/2 lg:my-4 lg:px-4 lg:w-1/3`}>
<div

Keybase proof

I hereby claim:

  • I am kellymears on github.
  • I am kellymears (https://keybase.io/kellymears) on keybase.
  • I have a public key ASAXeP3BsqyBgs2TxhJHPF0MXU24YSwy7nRZ1P0gIA3XFAo

To claim this, I am signing this object:

<?php
namespace App\Composers;
use App\Composers\Concerns\Services;
use TinyPixel\FieldsComposer\FieldsComposer;
/**
* Plugin single template
*/
@kellymears
kellymears / ServiceProviderTrait.php
Last active August 23, 2019 20:26
Utilize service providers
<?php
namespace App\Composers\Concerns;
use Roots\Acorn\Application;
use Illuminate\Support\Collection;
trait Services
{
/**
<?php
add_action('rest_api_init', function () {
!function_exists('use_block_editor_for_post_type') &&
require ABSPATH . 'wp-admin/includes/post.php';
$postTypes = collect(
get_post_types_by_support(['editor'])
);
/**
* Units
*/
const u = 1,
bump = {
small: 1.25,
medium: 1.5,
large: 2,
extra: 3,
}
import React from 'react'
import { useQuery } from '@apollo/react-hooks'
import gql from 'graphql-tag'
import {
SinglePage,
PageHeading,
PageContent,
} from '@styled/single-page'
const pageQuery = gql`
@kellymears
kellymears / Schedule.php
Created August 1, 2019 17:07
Roots\Acorn\Console\Scheduling\Schedule
<?php
namespace Roots\Acorn\Console\Scheduling;
use \DateTimeZone;
use \DateTimeInterface;
use Illuminate\Support\ProcessUtils;
use Illuminate\Support\Collection;
use Illuminate\Console\Scheduling\Event;
use Illuminate\Console\Scheduling\EventMutex;
@kellymears
kellymears / assetmon.php
Last active July 16, 2019 01:11
Sage 10 asset manager
<?php
namespace App\Assets;
use \Roots\Acorn\Application;
class Assets
{
public function __construct(Application $app)
{