Skip to content

Instantly share code, notes, and snippets.

View bericp1's full-sized avatar

Brandon Phillips bericp1

View GitHub Profile
@bericp1
bericp1 / custom-search-acf-wordpress.php
Created October 10, 2018 17:07 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
@bericp1
bericp1 / config.ex
Created March 31, 2018 20:30 — forked from gmodarelli/config.ex
Useful config wrapper for Elixir
defmodule Config do
@moduledoc """
This module handles fetching values from the config with some additional niceties
"""
@doc """
Fetches a value from the config, or from the environment if {:system, "VAR"}
is provided.
An optional default value can be provided if desired.
@bericp1
bericp1 / scroll-monitor.js
Created April 24, 2017 01:30 — forked from jacob-beltran/scroll-monitor.js
React Performance: Scroll Monitor Example
class ScrollMonitor extends React.Component {
constructor() {
this.handleScrollStart = this.startWatching.bind( this );
this.handleScrollEnd = debounce(
this.stopWatching.bind( this ),
100,
{ leading: false, trailing: true } );
}
componentDidMount() {