Skip to content

Instantly share code, notes, and snippets.

@foozlereducer
foozlereducer / amazon_tag_rendered.js
Last active August 22, 2017 19:43
Amazon Tag Rendered
<div class="l-main track_event " id="main" data-event-tracking="outfit"></div><aside class="l-sidebar"><li id="pn_dfpad-2" class="track_event-0 widget widget_pn_dfpad"> <div id="gpt-bigboxtop" class="pn_dfpads adslot">
<script type="text/javascript">
jQuery( document ).ready( function() {
apstag.fetchBids({
slots: [{
slotID: 'gpt-bigboxtop',
sizes: [
[ 300,250 ], [ 300,251 ], [ 300,600 ], [ 300,601 ]
]
}]
@foozlereducer
foozlereducer / feed.php
Last active September 11, 2017 18:12
The abstract feed class
<?php
namespace Postmedia\Web;
abstract class Feed {
/**
* Constructor
* @return object instance
*/
@foozlereducer
foozlereducer / nlp-frontend.js
Last active October 30, 2017 19:53
NLP Front-end Object
NLP={
Categories: [
{value:'Sports'},
{value: 'Baseball'}
],
Entities: [
{
'value': 'People',
'level': 1,
'children': [
@foozlereducer
foozlereducer / media.rss
Created November 1, 2017 18:00
Featured Image Missing From <media> block
<enclosure url=“https://nationalpostcom.files.wordpress.com/2017/11/highway_400_fatal_20171101.jpg” type=“image”></enclosure>
to become this:
<enclosure url=“https://nationalpostcom.files.wordpress.com/2017/11/highway_400_fatal_20171101.jpg” type=“image”></enclosure>
<media:content medium=“image” url=“https://nationalpostcom.files.wordpress.com/2017/11/highway_400_fatal_20171101-1.jpg?w=640" height=“480” width=“640">
<media:title type=“plain”> A multi-vehicle crash north of Toronto had commuters running for their lives after fuel on the highway ignited, police said on Wednesday, November 1, 2017.</media:title>
<media:credit role=“photographer” schema=“urn:ebu”>THE CANADIAN PRESS/Christopher Katsarov</media:credit>
</media:content>
SSL Errors
Ottawa Citizen:
Hard Failure<
• A script with an insecure url of "http://www.canada.com/js/origin-handler.js" was loaded via the javascript file: https://ottawacitizen.com/opinion/letters/todays-letters-5 on line 1406. The insecure URL may not be directly contained in the script file and may exist elsewhere.
You may need to contact your web hosting provider for assistance. This URL will need to be updated to use a secure URL for your padlock to return.
pp {slot: _.O, isEmpty: false, serviceName: "publisher_ads", slotContentChanged: true, size: Array(2), …}
advertiserId
:
14392141
campaignId
:
2118248054
companyIds
:
[129298981]
@foozlereducer
foozlereducer / .html
Last active October 10, 2018 19:44
big box dfp template
<style>
#age-gatead-overlay {
background-color: #dfdfdf;
width: 100%;
height: 100%;
position: relative;
text-align: center;
min-height: 250px;
min-width: 300px;
-webkit-transition: all 0.5s ease-out;
@foozlereducer
foozlereducer / sandbox0.php
Last active May 6, 2020 18:47
Sandbox0 Signed Cookies
<?php
$svg_path = plugins_url() . '/_library/jwplayer/SVG';
header("Access-Control-Allow-Origin: *");
$m3u8_url = 'https://cdn.dev1.markmeldrum.com/c4ecdaf5-5f26-4e5b-83d5-929c4345c48d/hls/Big+Buck+Bunny+60fps+4K+-+Official+Blender+Foundation+Short+Film.m3u8';
$expires = time() + 600;
$key_pair_id = "APKAIV3VOUGTYYHWA3BA";
$pk = WP_CONTENT_DIR . '/plugins/_library/pk-APKAIV3VOUGTYYHWA3BA.pem';
$mmurl_m3u8_policy = createSignedCookiePolicy($m3u8_url, $expires, $pk, $key_pair_id);
set_signed_cookie( $mmurl_m3u8_policy );
<?php
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Credentials', 'true');
$expires = time() + 600;
$key_pair_id = "APKAIE5VAVJWUKZ22KOQ";
$pk = WP_CONTENT_DIR . '/plugins/_library/pk-APKAIE5VAVJWUKZ22KOQ.pem';
$logo_url = 'https://cdn2.dev1.markmeldrum.com/logo_large.png';
$m3u8_url = 'https://cdn2.dev1.markmeldrum.com/c4ecdaf5-5f26-4e5b-83d5-929c4345c48d/hls/Big+Buck+Bunny+60fps+4K+-+Official+Blender+Foundation+Short+Film.m3u8';
<?php
header('Access-Control-Allow-Credentials', 'true');
header('Access-Control-Allow-Methods', "GET, HEAD, OPTIONS");
header('Range: 1024-1048576');
header('Content-Range: 1024-1048576');
$expires = time() + 600;
$key_pair_id = "APKAIE5VAVJWUKZ22KOQ";
$pk = WP_CONTENT_DIR . '/plugins/_library/pk-APKAIE5VAVJWUKZ22KOQ.pem';