Instantly share code, notes, and snippets.

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)

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
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{
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
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) {
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>
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
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"
View Editors.feature
# https://gist.github.com/jhedstrom/5708233
Feature: Editor Tests
As a Conference Manager
I should be able to create a Node of type Session
@javascript @api
Scenario: Make sure Conference Manager can create Session
Given I am logged in as a user with the "Conference Manager" role
When I visit "node/add/session"