Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Evan Agee EvanAgee

🎯
Focusing
Block or report user

Report or block EvanAgee

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
View WooCommerce: How To Get WooCommerce Page IDs
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@EvanAgee
EvanAgee / ie11svg.js
Created Jul 18, 2018
IE11 add/remove/contains class for SVG
View ie11svg.js
if (!("classList" in SVGElement.prototype)) {
Object.defineProperty(SVGElement.prototype, "classList", {
get() {
return {
contains: className => {
return this.className.baseVal.split(" ").indexOf(className) !== -1;
},
add: className => {
return this.setAttribute('class', this.getAttribute('class') + ' ' + className);
},
View gifhub.md

GifHub

Gone are the days of simple text-based comments in Github!

Squerge

![image](http://i.giphy.com/3og0IuECgoRILJUAfu.gif)

image

Merge

![image](https://media.giphy.com/media/3o7btP3U51GnFkj4f6/giphy.gif)

@EvanAgee
EvanAgee / changelog.md
Created Mar 6, 2017
changelog.md example
View changelog.md

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

Added

  • Marketing banner to prompt users to upgrade to a free account
@EvanAgee
EvanAgee / pug-bomb.php
Created Dec 7, 2016 — forked from inspectorfegter/pug-bomb.php
Pug Bomb API Endpoint WordPress Plugin
View pug-bomb.php
<?php
/*
Plugin Name: Pug Bomb API Endpoint
Description: Adds an API endpoint at /api/pugs/$n_pugs
Version: 0.1
Author: Brian Fegter
Author URL: http://coderrr.com
*/
class Pugs_API_Endpoint{
@EvanAgee
EvanAgee / KeystoneApiExample.md
Created Dec 7, 2016 — forked from JedWatson/KeystoneApiExample.md
Example of how to scaffold API endpoints for Posts in a Keystone project (based on the yo keystone example).
View KeystoneApiExample.md

This is an example of how to scaffold API endpoints to list / get / create / update / delete Posts in a Keystone website.

It's a modification of the default project created with the yo keystone generator (see https://github.com/JedWatson/generator-keystone)

Gists don't let you specify full paths, so in the project structure the files would be:

routes-index.js        -->    /routes/index.js         // modified to add the api endpoints
routes-api-posts.js    -->    /routes/api/posts.js     // new file containing the Post API route controllers
@EvanAgee
EvanAgee / notifyHipchat.php
Last active Aug 29, 2015
Send alert to HipChat with Behat test fails
View notifyHipchat.php
<?php
/**
* Send an alert to HipChat when a test fails
*
* @AfterStep
*/
public function notifyHipchat(Behat\Behat\Event\StepEvent $event)
{
if ($event->getResult() === Behat\Behat\Event\StepEvent::FAILED) {
@EvanAgee
EvanAgee / ContentTypes.feature
Created May 13, 2014
Example Behat Scenario Outline
View ContentTypes.feature
Feature: Content Type Tests
As an Administrator
I should be able to create nodes of all Content Types
@api
Background:
Given I am logged in as a user with the "administrator" role
@api @Env::Backend @Creator::EvanAgee
Scenario Outline: Make sure we can create nodes of type <node-type>
@EvanAgee
EvanAgee / Views.feature
Created May 9, 2014
Behat test to verify the display of multiple Drupal views
View Views.feature
Feature: Views Tests
As an unauthenticated user
I should see various views throughout the site
@api @Env::Frontend @Creator::EvanAgee
Scenario: Check Home Page Views
Given I am not logged in
Then the element "#views_slideshow_cycle_main_sliding_banners-sliding_banner" should exist
Then the element ".view-id-ministry_partner" should exist
Then the element ".view-id-speaker" should exist
@EvanAgee
EvanAgee / ContentTypes.feature
Created May 9, 2014
Behat test for multiple Drupal Content Types
View ContentTypes.feature
Feature: Content Type Tests
As an Administrator
I should be able to create nodes of all Content Types
@api @Env::Backend @Creator::EvanAgee
Scenario: Make sure we can create Basic Pages
Given I am logged in as a user with the "administrator" role
And I visit "node/add/page"
Then I enter "BDD TEST BASIC PAGE" for "Title"
And I attach the file "photo.jpg" to "edit-field-images-und-0-upload"
You can’t perform that action at this time.