Skip to content

Instantly share code, notes, and snippets.

@csessig86
csessig86 / itemprop-location.rb
Created August 8, 2016 20:02
Itemprop location
.location{itemprop: "location"}
=fa_icon "map-marker", class: "fa-secondary"
%span{itemprop: "location"}
=event.location.city unless event.location.city.blank?
@csessig86
csessig86 / boomtrain.js
Last active August 9, 2016 13:08
Boomtrain post
$.ajax({
type: "POST",
url: 'https://boomtrain.auth0.com/oauth/ro',
data: {
"client_id": "FP3iP1blgJbdmmSRYS1I96byb1nXryTs",
"username": "[email protected]",
"password": "gazboom131",
"connection": "Username-Password-Authentication",
"scope": "openid app_metadata name email user_id",
"grant_type": "password"
@csessig86
csessig86 / immunization-rates.html
Last active August 16, 2016 16:45
Immunization rates embed
<div class="left">
<h3>
<a href="http://thegazette.com/data/ia-immunization-rates" target="_blank">
Database: Immunization rates for schools near you
</a>
</h3>
<a href="http://thegazette.com/data/ia-immunization-rates" target="_blank">
<img style="width: 100%;" src="http://thegazette.com/Includes/data/projects/ia-immunization-rates/ss.jpg" alt="">
</a>
<p class="embed-subhead">
@csessig86
csessig86 / ver.html
Created August 17, 2016 22:10
Add ?ver
<script src="/js/scripts-combined.js?ver=5"></script>
@csessig86
csessig86 / navarticles.html
Created August 23, 2016 16:04
navigationItem using AJAX
<script>
$(document).ready(function() {
$.get('/section/&template=NavArticles&navProfile=<%Script_Profile_ID%>', function(data) {
$('.profile<%Script_Profile_ID%>').html(data);
});
});
</script>
@csessig86
csessig86 / flood-gauges.html
Created August 25, 2016 18:25
Flood gauge embed
<h3 class="hide-desktop show-mobile">MAP: Flood threats in Iowa</h3>
<p class="hide-desktop show-mobile"><a href="http://files.gazlab.com/content-host/flood_gauges/index.html" target="_blank"> <img src="http://files.gazlab.com/content-host/flood_gauges/ss.jpeg" alt="" width="100%" /> </a></p>
<div class="hide-650">
<div class="center"><iframe frameborder="0" height="600" scrolling="no" src="http://files.gazlab.com/content-host/flood_gauges/index.html" width="300"></iframe></div>
</div>
<div class="iframe-open-window hide-desktop show-mobile"> </div>
@csessig86
csessig86 / ad-names.js
Created August 29, 2016 16:11
GA ad names
googletag.display('ad-leaderboard');
googletag.display('ad-medrec-top');
googletag.display('ad-medrec-middle');
googletag.display('ad-medrec-bottom');
googletag.display('ad-scoreboard-leaderboard-top');
googletag.display('ad-mobile-leaderboard');
googletag.display('ad-medrec-mobile');
@csessig86
csessig86 / dfp.html
Last active August 31, 2016 15:07
New DFP code
<script type='text/javascript'>
// DFP ad calls
googletag.cmd.push(function() {
// Leaderboard
var mappingleaderboard = googletag.sizeMapping()
.addSize([0, 0], [320, 50])
.addSize([768, 0], [[728, 90], [320, 100], [320, 50]])
.addSize([990, 0], [728, 90])
.addSize([1300, 0], [[970, 90],[728, 90]])
.build();
@csessig86
csessig86 / header-bidding-1.js
Created August 30, 2016 18:21
Header bidding requirement part 1
// Header bidding
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync()
});
googletag.enableServices();
@csessig86
csessig86 / header-bidding-2.js
Created August 30, 2016 18:24
Header bidding requirement part 2
<div id="ad-leaderboard">
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('ad-leaderboard');
});
</script>
</div>