Skip to content

Instantly share code, notes, and snippets.

View dezoy's full-sized avatar

Anton dezoy

  • Moscow
View GitHub Profile
@dezoy
dezoy / worker.js
Created December 3, 2021 06:04 — forked from bcnzer/worker.js
Cloudflare Worker that uses Workers KV to get Authorization data. All authentication and authorization is done on the edge
addEventListener('fetch', event => {
event.respondWith(handleRequest(event))
})
/**
* Entry point of the worker
*/
async function handleRequest(event) {
try {
// Get the JWT
@dezoy
dezoy / streaming-responses-200.js
Created December 3, 2021 06:04 — forked from harrishancock/streaming-responses-200.js
Cloudflare Workers streaming response bodies example with unconditional 200
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
/**
* Make multiple requests,
* aggregate the responses and
* stream it back as a single response.
*/
async function fetchAndApply(request) {
@dezoy
dezoy / NuxtValetDriver.php
Created August 26, 2021 05:55 — forked from james2doyle/NuxtValetDriver.php
A Laravel Valet driver for running generated Nuxt.js sites. This driver assumes you have not changed the default public path (/dist) in the nuxt.config.js
<?php
/**
* NuxtValetDriver for running compiled nuxt.js sites
*/
class NuxtValetDriver extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
@dezoy
dezoy / cmaf.sh
Created July 22, 2021 06:30 — forked from GnaphronG/cmaf.sh
HLS and DASH Manifest with CMAF files
#! /bin/sh
file="bbb_sunflower_2160p_30fps_normal.mp4"
timestamp=`date +%s`
ffmpeg="docker run --rm -it --workdir /tmp -v $PWD:/tmp kynothon/moviola:4.0-alpine "
bento4="docker run -it --rm -u $(id -u):$(id -g) -v $PWD:/tmp --workdir /tmp ggoussard/bento4docker "
echo "Getting the file"
curl -LO http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_30fps_normal.mp4
@dezoy
dezoy / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">