Skip to content

Instantly share code, notes, and snippets.

View jaalmaa's full-sized avatar

jaalmaa

  • Reston, VA
View GitHub Profile
@jaalmaa
jaalmaa / worker.js
Created April 10, 2021 13:51
Cloudflare Worker for Adding Custom Domain Name to Public Notion Page
const MY_DOMAIN = "<YOUR_DOMAIN>"
const START_PAGE = "<URL_FOR_PUBLIC_NOTION_PAGE>"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS",
#!/bin/bash
# update packages and repositories
echo "Updating packages and repositories..."
sudo apt update -y
sudo apt upgrade -fy
# install curl
echo "Installing curl..."
sudo apt install -y curl