Skip to content

Instantly share code, notes, and snippets.

Stephanie Eckles 5t3ph

Block or report user

Report or block 5t3ph

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@5t3ph
5t3ph / gatsby-useImgSrc-hook.tsx
Last active May 15, 2019
Gatsby useStaticQuery to create custom hook for returning an image src path
View gatsby-useImgSrc-hook.tsx
/**
* Required plugins: gatsby-source-filesystem and gatsby-plugin-sharp
*
* Basic Hook Usage:
*
* import useImgSrc from '../utils/useImgSrc';
*
* const Image = ({img}) => {
* const imgSrc = useImgSrc(img);
*
@5t3ph
5t3ph / sass-static-package.json
Last active Mar 31, 2019
SASS compile|autoprefix|minimize and browser-sync server for static HTML
View sass-static-package.json
/*
Project Structure:
src/
- css/ (generated by node-sass)
- sass/
- - style.scss
- index.html
npm run develop - copies src files to dist/ and starts server with live reload
@5t3ph
5t3ph / gatsby-fetch-permalink.tsx
Created Jan 7, 2019
Gatsby - Fetch permalink based on known slug
View gatsby-fetch-permalink.tsx
@5t3ph
5t3ph / gatsby-custom-markdown-components.tsx
Last active Jan 4, 2019
Gatsby Custom Markdown Components - prevent wrapping with paragraph
View gatsby-custom-markdown-components.tsx
/* Review the following article for more info on getting started with custom components.
* @link https://using-remark.gatsbyjs.org/custom-components/
*
* Example here demonstrates detecting if a custom component is being used
* If so, do not wrap it with a paragraph tag and invalidate DOM nesting
*/
import * as React from 'react';
import rehypeReact from 'rehype-react';
@5t3ph
5t3ph / cpt-search-results
Last active Aug 29, 2015
WordPress: Customize CPT Search Results
View cpt-search-results
/*
* For use when you have a custom page to display a custom post type but also need the CPT pulled into search results.
*
* Includes functions hooked to filters to alter the title, permalink, and excerpt.
* Uses switch statements for easily extending to additional custom post types.
*
*/
<?php
/**
@5t3ph
5t3ph / gist:f87dad1fac5f6d920c1a
Last active Aug 29, 2015
WordPress WP_User_Query Transient Array Search
View gist:f87dad1fac5f6d920c1a
<?php
/*
* WordPress WP_User_Query Transient Array Search
*
* Purpose: To search array of relevant user fields
* stored as an array in a transient
*
* Example Array:
* [userid] => array (
'0' => 'first_name',
You can’t perform that action at this time.