Keybase proof
I hereby claim:
- I am johnfmorton on github.
- I am johnmorton (https://keybase.io/johnmorton) on keybase.
- I have a public key ASDu_0vG5Qiy-9cd2ilRG_Ykj1cFsrOxNLWZ5aiNYh1ZSQo
To claim this, I am signing this object:
<?php | |
// Referenced in blog post, Learning the FileMaker Data API by trial and error. | |
// https://supergeekery.com/blog/learning-the-filemaker-data-api-by-trial-and-error | |
// Sample URL hitting this proxy: | |
// https://my-proxy-server.com/api/fm-proxy-pdf-viewer.php?token=123&pdfUrl=https%3A%2F%2Fexample-filemaker-server.com%2FStreaming_SSL%2FMainDB%abc.pdf%3FRCType%3DEmbeddedRCFileProcessor | |
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS' && isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) { | |
// This is a preflight request, so send the CORS headers | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE'); |
ol { | |
list-style-type: none; | |
counter-reset: custom-counter; | |
} | |
ol li { | |
counter-increment: custom-counter; | |
} | |
ol li::before { |
I hereby claim:
To claim this, I am signing this object:
// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard | |
/** | |
* Interface CopyToClipboard params | |
*/ | |
interface ICopyToClipboard { | |
/** HTML reference identifier ```<div id="foo"></div>``` */ | |
target?: string; | |
/** String value */ | |
value?: string; |
<?php | |
namespace modules; | |
use modules\TwigFilterSha512; | |
use Craft; | |
/** | |
* Custom module class. | |
* | |
* This class will be available throughout the system via: |
// get all .blade elements | |
let bladeElements = document.querySelectorAll('.blade'); | |
function handleIntersection(entries) { | |
entries.map((entry) => { | |
if (entry.isIntersecting) { | |
entry.target.classList.add('blade--active'); | |
} else { | |
entry.target.classList.remove('blade--active'); | |
} |
<?php | |
/** | |
* About this script: | |
* This proxy was built with PartyTown.js in mind. https://github.com/BuilderIO/partytown | |
* Partytown is a lazy-loaded library to help relocate resource intensive scripts into a | |
* web worker, and off of the main thread. | |
* Many third-party scripts already provide the correct CORS headers, but not all do. | |
* For services that do not add the correct headers, then a reverse proxy to another domain must be used in order to provide the CORS headers. | |
* see: https://github.com/BuilderIO/partytown/wiki/Proxying-Requests |
var ambientVideo = document.getElementById("ambientVideo"); | |
/** | |
// in HTML page | |
<video muted playsinline id='abientVideo'> | |
<source src="my-video-file.webm" type="video/webm"> | |
</video> |
<!-- Revised snippet based on https://www.stefanjudis.com/snippets/a-picture-element-to-load-correctly-resized-webp-images-in-html/ --> | |
<picture> | |
<!-- load avif if supported --> | |
<source type="image/avif" | |
srcset="image-100x200.avif 100w, | |
image-200x400.avif 200w" | |
sizes=" | |
(max-width: 768px) calc(100vw - 3em), | |
(max-width: 1376px) calc(50vw - 8em), | |
550px" |
# This script is used to deploy a Craft CMS site on an Arcustech server | |
# | |
# It will clone the git main branch from a private repo into | |
# a 'deployments' directory and them create symlinks for the | |
# static assets: .env, and 3 directories of assets. | |
# It then does a composer install of the Craft site. | |
# The scripts in the composer file are like this: https://github.com/nystudio107/devmode/blob/f2b231e772026860f75e255c9e22722dac983de8/cms/composer.json#L55 | |
# These scripts update Craft, clear caches, etc. | |
# Finally, it will symlink the web directory in the newly downloaded files | |
# to the public folder which is the one used by Arcustech |