Skip to content

Instantly share code, notes, and snippets.

@foozlereducer
foozlereducer / SampleMetric.js
Last active February 23, 2024 14:56
Vue Device Switching
/** ---------------------------------------------------------------*/
// app/src/views/SampleMetric.vue
/** ---------------------------------------------------------------*/
<script setup>
import { deviceSize } from '../composables/deviceSize.js'
import HomeView from './Home.vue';
import Phone from './Phone.vue'
import Tablet from './tablet.vue'
import {devices} from '../composables/devices.js'
const sizes = deviceSize(devices)
<?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';
<?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';
@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 );
@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;
pp {slot: _.O, isEmpty: false, serviceName: "publisher_ads", slotContentChanged: true, size: Array(2), …}
advertiserId
:
14392141
campaignId
:
2118248054
companyIds
:
[129298981]
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.
@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>
@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 / feed.php
Last active September 11, 2017 18:12
The abstract feed class
<?php
namespace Postmedia\Web;
abstract class Feed {
/**
* Constructor
* @return object instance
*/