Skip to content

Instantly share code, notes, and snippets.

View ghankerson's full-sized avatar

Geoff Hankerson ghankerson

  • American Public Media
View GitHub Profile
$(this.config.audio).apmplayer_ui({
playables: [{
"identifier": "adswizz_mpr_news",
"title": "MPR News",
"description": "live stream",
"flash_server_url": "rtmp://wowza.stream.publicradio.org/news/",
"flash_file_path": "news.stream",
"http_file_path": "http://nis.stream.publicradio.org/nis.mp3",
"buffer_time": 6,
"type": "live_audio"
/**
* @name nowplaying_ws.js
*/
/**
* @name APMNowPlaying
* @description protoype pattern to allow
* @class
*/
var APMNowPlaying = function(websocketurl) {
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /Users/ghankerson/Sites/arw
ServerName arw.geoff
<Directory /Users/ghankerson/Sites/arw>
AllowOverride All
Options FollowSymLinks
DirectoryIndex index.html index.php
Require all granted
</Directory>
<?php
require 'vendor/autoload.php';
$client = new Elasticsearch\Client();
function feedQuery($count = false, $start = 0, $max = 100) {
$q = new \EntityFieldQuery();
$q->entityCondition('entity_type', 'node')
->entityCondition('bundle', 'story')
class Parent
include Mongoid::Document
field :name, type: String
field :url, type: String
field :email, type: String
field :phone, type: String
field :address, type: String
field :donate_url, type: String
field :twitter, type: String
field :facebook, type: String
/* ==========================================================================
These rules only target membership ads
========================================================================== */
#membership-ad-frame-wrapper.has-ad {
position: relative;
padding-top: 16%;
}
@media only screen and (min-width: 22.5625em) { //361px
#frame-wrapper.has-ad {
/* Initialize Google Publisher Tags API - Docs: http://goo.gl/ZqOiy */
var gptadslots = [];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
@ghankerson
ghankerson / gist:f9b885d783f57f2f65d9
Created December 9, 2014 18:19
GPT Tags take 100 bazillion
/* Initialize Google Publisher Tags API - Docs: http://goo.gl/ZqOiy */
var gptadslots = [];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
<%= form_for(@organization) do |f| %>
<% if @organization.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@organization.errors.count, "error") %> prohibited this organization from being saved:</h2>
<ul>
<% @organization.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
<!DOCTYPE html>
<!--[if IEMobile 7]><html class="ie iem7" lang="en" dir="ltr"><![endif]-->
<!--[if lte IE 6]><html class="ie lt-ie9 lt-ie8 lt-ie7" lang="en" dir="ltr"><![endif]-->
<!--[if (IE 7)&(!IEMobile)]><html class="ie lt-ie9 lt-ie8" lang="en" dir="ltr"><![endif]-->
<!--[if IE 8]><html class="ie lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if IE 9]><html class="ie ie9" lang="en" dir="ltr"><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)]><!--><html lang="en" dir="ltr" prefix="content: http://purl.org/rss/1.0/modules/content/ dc: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ og: http://ogp.me/ns# rdfs: http://www.w3.org/2000/01/rdf-schema# sioc: http://rdfs.org/sioc/ns# sioct: http://rdfs.org/sioc/types# skos: http://www.w3.org/2004/02/skos/core# xsd: http://www.w3.org/2001/XMLSchema#"><!--<![endif]-->
<head profile="http://www.w3.org/1999/xhtml/vocab">
<meta charset="utf-8" />