Skip to content

Instantly share code, notes, and snippets.

Frank Weindel frank-weindel

Block or report user

Report or block frank-weindel

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 example.js
import { iff } from './globalUtils';
function someRenderFunction() {
return (
<div className="otsPropertyForm">
{iff(showTeamList, () => (
<FormSection>
<FormHeading>Select a Team:</FormHeading>
<ListBox items={teamItems} value={teamId} onChange={this._onTeamListChange} />
</FormSection>
@frank-weindel
frank-weindel / gist:d3c331f76c719c84370b
Created Jul 16, 2015
A simple function for simulating an "if statement" within a react render
View gist:d3c331f76c719c84370b
/**
* Calls the callback and returns its result if the expression is truthy
*
* @param {string} expression
* @param {Function} callback
* @return {variant} Value of callback() if expression is true. Otherwise 'undefined'
*/
export function iff(expression, callback) {
if (expression) {
@frank-weindel
frank-weindel / gist:d4e6accfdadc44652f43
Last active Jun 28, 2016
Injected Comcast Copyright Alert Code + Rendered DOM Result
View gist:d4e6accfdadc44652f43
<!-- Injected Code -->
<script language="JavaScript" type="text/javascript">
// Comcast Cable Communications, LLC Proprietary. Copyright 2014.
// Intended use is to display browser notifications for critical and time sensitive events.
var _ComcastAlert = (function(){
return {
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'
, dragObj: {zIndex: 999999}
You can’t perform that action at this time.