Skip to content

Instantly share code, notes, and snippets.

<head>
<!-- Following Other contents of head tag of article pages -->
<!-- Optimizely -->
<script src="//cdn.optimizely.com/js/335305610.js"></script>
<script type="text/javascript" src="https://cdn.theatlantic.com/assets/static/a/theatlantic/js/head.min.b3e3f6737f5f.js" charset="utf-8"></script>
<script type='text/javascript' src="//contextual.media.net/bidexchange.js?cid=8CUD82U22&version=3.1&https=1"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="https://cdn.theatlantic.com/assets/static/a/common/js/ie8.polyfills.ba3cdde2f960.js"></script>
@tamilmani58
tamilmani58 / app-min-fix.742b4dac.js
Last active October 2, 2016 02:01
NYT Bidexchange Fix
n.prototype.loadAdSlot = function () {
return googletag.cmd.push(function (t) {
return function () {
var n, r, o, s, a, u, l;
return u = "sponsT" === (l = t.adPosition) || "sponsM" === l ? googletag.defineSlot(t.dfpUnitPath, t.adSize, t.slotName).setCollapseEmptyDiv(!0, !0) : googletag.defineSlot(t.dfpUnitPath, t.adSize, t.slotName).setCollapseEmptyDiv(!0),
u.setTargeting("pos", t.adPosition),
o = e("." + t.adPosition).first().attr("data-position-meta"),
"article" === o && (n = e("#dfp-ad-" + t.adPosition),
r = t.adPosition.match(/^mid(\d+)/)[1],
a = n.attr("data-p-location"),
@tamilmani58
tamilmani58 / CQL Bulk
Last active August 29, 2015 14:23
Sample SSTable Writer Code
private static void writeTSMetric(String KEYSPACE) {
// Create output directory that has keyspace and table name in the path
String TABLE = CFTimeSliceMetric.name;
File outputDir = new File(DEFAULT_OUTPUT_DIR + File.separator + KEYSPACE + File.separator + TABLE);
if (!outputDir.exists() && !outputDir.mkdirs()) {
throw new RuntimeException("Cannot create output directory: " + outputDir);
}
/**