This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Create an array of timestamps for posts | |
// and put them into an array called $timestamps. | |
foreach ($timestamps as $timestamp) { | |
$day = date("j", $timestamp); | |
$hour = date("G", $timestamp); | |
if (isset($heatcalendar['posts'][$day][$hour])) { | |
$heatcalendar['posts'][$day][$hour]++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = preg_replace( | |
'/(?<=^|\s)@([a-z0-9_]+)/i', | |
'<a href="https://twitter.com/$1">@$1</a>', | |
$string | |
); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin you@yourdomain.com | |
ServerName yourdomain.com | |
ServerAlias www.yourdomain.com | |
DocumentRoot /path/to/yourdomain | |
Redirect / https://yourdomain.com/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerAdmin you@yourdomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function (win, doc) { | |
'use strict'; | |
if (!win.XMLHttpRequest || !win.FormData || !win.addEventListener || !doc.querySelectorAll) { | |
// doesn't cut the mustard. | |
return; | |
} | |
function hijaxForm (formElement) { | |
var progressBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function (win, doc) { | |
'use strict'; | |
if (!doc.querySelectorAll || !win.addEventListener) { | |
// doesn't cut the mustard. | |
return; | |
} | |
var toggles = doc.querySelectorAll('[aria-controls]'); | |
var togglecount = toggles.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Standardisation</h1> | |
There was not a lot of discussion of this at <a href=Introduction.html>ECHT90</a>, but there seem to be two leads: | |
<ol> | |
<li><a href=People.html#newcombe>Steve newcombe's</a> and Goldfarber's "Hytime" committee | |
looking into SGML, and | |
<li>An ISO working group known as MHEG, "Multimedia/HyperText Expert Group". | |
led by one Francis Kretz (Thompsa SA? Rennes?). | |
</lo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function() { | |
// A cache for core files like CSS and JavaScript | |
var staticCacheName = 'static'; | |
// A cache for pages to store for offline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function() { | |
// Update 'version' if you need to refresh the cache | |
var staticCacheName = 'static'; | |
var version = 'v1::'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
function postToMedium($data=array()) { | |
$user_id = "XXXX"; | |
$accessToken = "XXXX"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
function ampify($html='') { | |
# Replace img, audio, and video elements with amp custom elements | |
$html = str_ireplace( | |
['<img','<video','/video>','<audio','/audio>'], |