Skip to content

Instantly share code, notes, and snippets.

View ptcampbell's full-sized avatar
🌲
(◍•﹏•)

Patrick Campbell ptcampbell

🌲
(◍•﹏•)
View GitHub Profile
Log of the following commands:
uname -r
cat /etc/issue
lsusb
lsusb -v -d 22f0:0008
dmesg
5.4.0-33-generic
Linux Mint 20.3 Una \n \l
@ptcampbell
ptcampbell / get-direct-upload-url.js
Last active November 11, 2021 07:36
Worker script to call direct_upload endpoint and get URL
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
const url = "https://api.cloudflare.com/client/v4/accounts/:account_id/images/v1/direct_upload"
async function handleRequest(request) {
const config = {
method: 'POST',
headers: {
import { createState, useState } from '@hookstate/core'
import { supabase } from './client'
export type Area = {
id: string
name: string
updated_at: string
data: any
}
<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;