Skip to content

Instantly share code, notes, and snippets.

View gregrickaby's full-sized avatar
:octocat:

Greg Rickaby gregrickaby

:octocat:
View GitHub Profile
@gregrickaby
gregrickaby / button.stories.tsx
Last active September 7, 2020 20:17
React Component and Storybook Template - 2020
import React from 'react'
import Button from './Button'
/**
* The following is a story.
*
* It follows the "Component Story Format" (CSF), an open standard
* based on ES6 modules which is portable beyond Storybook. This is
* version 2 of that standard and uses args.
*
@gregrickaby
gregrickaby / settings.json
Created April 14, 2020 14:02
vscode settings to share with team
{
"breadcrumbs.enabled": true,
"explorer.openEditors.visible": 0,
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
"editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 13,
"editor.fontLigatures": true,
"editor.renderWhitespace": "all",
"editor.multiCursorModifier": "ctrlCmd",
"editor.minimap.renderCharacters": false,
@gregrickaby
gregrickaby / composer.json
Created July 12, 2019 14:08
WDS New Project Composer Setup
{
"name": "foo-project/wordpress-wp-content",
"description": "Plugins and Theme to power the Foo Project website built atop WordPress.",
"type": "project",
"require": {
"webdevstudios/sso": "^2.0",
"webdevstudios/advanced-custom-fields-pro": "^5.8",
"yoast/wordpress-seo-premium": "^11.6",
"wpackagist-plugin/stream": "^3.3",
"webdevstudios/wp-migrate-db-pro": "^1.9",
@gregrickaby
gregrickaby / disable-beaver-builder-global-padding-margin.php
Last active October 2, 2019 12:35
Disable Beaver Builder global padding and margin
<?php
/**
* Set Beaver Builder defaults
*
* @param {object} $defaults The default settings.
* @param {object} $form)_type The module settings.
* @return $defaults
*/
function grd_set_bb_defaults( $defaults, $form_type ) {
@gregrickaby
gregrickaby / javascript_101.md
Last active September 15, 2017 01:41
JavaScript: How to create new div dynamically, change it, move it, modify it in every way possible?
@gregrickaby
gregrickaby / wp-query-ref.php
Created June 27, 2017 15:24 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@gregrickaby
gregrickaby / php-array-isset-vs-empty.md
Last active May 31, 2024 13:35 — forked from efuller/array.md
PHP Array isset and empty
@gregrickaby
gregrickaby / get-related-posts-by-tag.php
Created September 21, 2016 18:32
Get related posts by Tag

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})