Skip to content

Instantly share code, notes, and snippets.

@jnunemaker
jnunemaker / harmony.rb
Created November 10, 2009 01:20
simple app configuration
module Harmony
# Allows accessing config variables from harmony.yml like so:
# Harmony[:domain] => harmonyapp.com
def self.[](key)
unless @config
raw_config = File.read(RAILS_ROOT + "/config/harmony.yml")
@config = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
end
@config[key]
end
@alexwcarl
alexwcarl / index.html
Created December 13, 2016 17:59
Adzerk/prebid.js Header Bidding Example HTML
<html>
<head>
<script>
/* Load adOS.js */
(function() {
var d = document;
var protocol = d.location.protocol == "https:" ? "https" : "http";
var z = d.createElement("script");
z.type = "text/javascript";
z.src = protocol + "://static.adzerk.net/ados.js";