Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View zarathustra323's full-sized avatar

Jacob Bare zarathustra323

View GitHub Profile

Example Data Objects

On 7/16/2020 Chuck Gaffaney, Production Designer at Massman Automation LLC in Villard, Minnesota, USA viewed the Base product "Bobcat Company Expands its Excavator Lineup with the New E165" on ForConstructionPros.com. The product is scheduled and tagged to Equipment, and resides in the "Equipment > Earthmoving Equipment > Excavators" channel and is related to the "Bobcat Co." company in BASE.

Chuck also viewed nine other content items during this session, including three press releases, three videos, two news stories, and one article.

Raw Event from BASE

<!-- In the welcome ad template, replace this block of code... -->
<script>
var bgImagepath = window.location.protocol + "//" + window.location.hostname + "/sites/all/themes/penton_core_theme/images/ContentPillar_Welcome_1200.png";
document.querySelector('#overlay-%%CACHEBUSTER%%').style.backgroundImage = 'url('+bgImagepath+')';
var lpath1 = parent.document.getElementById("wl_flogop_div").innerHTML;
console.log('logo_path->' + lpath1);
document.querySelector('#white_logo-%%CACHEBUSTER%% > img').src = lpath1;
</script>
@zarathustra323
zarathustra323 / query-load-more.marko
Last active October 10, 2019 14:43
Published Content Queries
import { getAsObject } from '@base-cms/object-path';
$ input.query = getAsObject(input, 'query');
$ input.pageNumber = input.pageNumber || 1;
$ const block = 'published-content-query-load-more';
$ const appendTo = input.appendTo || `.${block}`;
<endeavor-published-content-query|{ nodes, loadMore }| ...input track-page-load=true>
$ const { endCursor, hasNextPage, provide } = loadMore;
<endeavor-load-more-button

Firehouse Data Structure

Form Submissions

Request More Information (Inquiry)

This form is submitted when a user wishes to request more information about a company or company's product. It can be submitted by an anonymous user, a previously identified (but not logged-in) user, or a logged-in user. The submission data consists of:

  • Standard identity text fields, such as name, company name, etc.
  • Omeda demographic questions/answers, such as "Primary Business Category," etc.
  • The inquired Company
  • The inquired Product's primary section/category information.
@zarathustra323
zarathustra323 / index.html
Created September 27, 2017 18:25
Dirty React Starter Example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>
/**
* The `Entity` object.
*
* Describes an object that loosely represents some sort of database object, regardless if
* the data is actually loaded from a database, a third-party source, or generated on-the-fly.
* The entity `type` can be thought of as a "table name" where objects of the same type would
* be persisted.
*
* Each entity must provide a `clientId` that uniquely identifies the object when compared
* to other objects of the same `type`. Ultimately, the unique-entity-identifier is derived
<container>
<group width="100">
<group width="66">
<block type="content-display" width="100" title="Top News">
<criteria limit="7"></criteria>
<flow width="100" item-width="100" item-count="1">
<for-each-item>
<group width="50">
<element-image aspect-ratio="16:9"></element-image>
</group>
@zarathustra323
zarathustra323 / doctrine_dbref_removal.php
Created March 14, 2014 16:42
Doctrine Event Subscriber to Remove DBRefs of Deleted Documents
<?php
namespace Foo\BarBundle\Listener;
use Doctrine\Common\EventSubscriber;
use Doctrine\ODM\MongoDB\Events;
use Doctrine\ODM\MongoDB\Event\LifecycleEventArgs;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory;
use Doctrine\ODM\MongoDB\Types\Type as MongoType;