Skip to content

Instantly share code, notes, and snippets.

View StoneyEagle's full-sized avatar
🦅

Stoney_Eagle StoneyEagle

🦅
View GitHub Profile
@StoneyEagle
StoneyEagle / 404.html
Created January 10, 2025 14:25 — forked from leonsilicon/404.html
Properly set up routing for an SPA hosted on GitHub pages
<!DOCTYPE html>
<html>
<head>
<script>
sessionStorage.redirect = location.href;
const projectPages = true; // If you're using the base .github.io domain without a path (i.e. <name>.github.io is your home page), set this to false
const l = window.location;
const repo = projectPages ? '/' + l.pathname.split('/')[1] : '';
l.replace(
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + repo
@StoneyEagle
StoneyEagle / obs-websocket.js
Created March 6, 2024 22:59 — forked from clarkio/obs-websocket.js
Connecting to OBS Websocket Server with Authentication
const obsConfig = {
address: '127.0.0.1',
port: 4455,
password: 'your-password'
}
const socket = new WebSocket(`ws://${obsConfig.address}:${obsConfig.port}`);
const password = obsConfig.password;
socket.onopen = function(event) {