Skip to content

Instantly share code, notes, and snippets.

View jakecausier's full-sized avatar

Jake Causier jakecausier

  • Revolution Growth
  • Manchester, UK
View GitHub Profile
@jakecausier
jakecausier / upload.js
Created March 15, 2020 16:28
CloudFlare Stream upload using tus-js-client
const tus = require("tus-js-client")
document.getElementById('tus-video-input').addEventListener('change', function(e) {
var file = e.target.files[0]
var xhr = new XMLHttpRequest()
console.log(file);
xhr.open('POST', `${videoUploaderConfig.CloudflareEndpoint}/accounts/${videoUploaderConfig.CloudflareApiAccount}/stream`, true)
@jakecausier
jakecausier / gist:912c08972f3659e801097dd3c317e027
Created October 3, 2019 14:20
Magic WordPress image-grabber at requested size from ID
<?php echo esc_url( wp_get_attachment_image_src( IMAGE_ID_SOURCE, 'large' )[0] ) ?>
// Variables
//
// Variables should follow the `$component-state-property-size` formula for
// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.
//
// Color system
//