Skip to content

Instantly share code, notes, and snippets.

View WeaverOfTheWeb's full-sized avatar
🔎
Looking to collab & for new challenges!

Lewis WeaverOfTheWeb

🔎
Looking to collab & for new challenges!
View GitHub Profile
@WeaverOfTheWeb
WeaverOfTheWeb / index.html
Last active March 16, 2025 21:38
Vue3 Image Editor
<div id="app">
<div class="canvas-container" ref="canvasContainer">
<canvas ref="canvas" @mousedown="startDrag" @mousemove="drag" @mouseup="endDrag" @mouseleave="endDrag" @touchstart="handleTouchStart" @touchmove="handleTouchMove" @touchend="handleTouchEnd" @wheel="handleWheel">
</canvas>
<div class="controls">
<label class="button" for="file-upload">
Import Image
</label>
<input id="file-upload" type="file" accept="image/*" @change="importImage">
@WeaverOfTheWeb
WeaverOfTheWeb / whisper-transcribe.bash
Created January 21, 2023 16:13 — forked from danirukun/whisper-transcribe.bash
Transcribe (and translate) any VOD (e.g. from Youtube) using Whisper from OpenAI and embed subtitles!
#!/usr/bin/env bash
# Small shell script to more easily automatically download and transcribe live stream VODs.
# This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp
# Use `./transcribe-vod help` to print help info.
# MIT License
# Copyright (c) 2022 Daniils Petrovs
@WeaverOfTheWeb
WeaverOfTheWeb / WebAudio.js
Created October 18, 2022 23:17 — forked from mrdoob/WebAudio.js
HTMLAudioElement polyfill using the WebAudio API with seamless loop support in Safari.
/**
* @author mrdoob / http://mrdoob.com/
*/
function WebAudio( context ) {
if ( context === undefined ) {
context = WebAudio.context;
@WeaverOfTheWeb
WeaverOfTheWeb / image-swap.js
Last active June 30, 2021 15:18
Image swapping tool for HCS
if (window.location.host.indexOf("hilton.com") === -1) {
alert("This script only works on hilton.com!");
} else {
document.designMode = "on";
const borderStyle = "4px dotted #fdb714";
const links = document.querySelectorAll('a');
for (var i = 0; i < links.length; i++) links[i].onclick = e => e.preventDefault();
@WeaverOfTheWeb
WeaverOfTheWeb / 📺 Picture in Picture (PiP) Bookmarklet
Created July 11, 2019 17:48
A JavaScript bookmarklet for opening media content within Picture in Picture.
javascript:(() => document.querySelector("video").requestPictureInPicture())()
@WeaverOfTheWeb
WeaverOfTheWeb / localFontChecker.js
Last active May 2, 2018 10:54
Check if a font is installed locally
/* Author - Lewis Shaw [lewisshaw.me], Use: localFontChecker('font name') // returns true || false */
'use strict';var localFontChecker=function(a){if(!a)return!1;var b=document.createElement('span');b.innerText='hello',b.style.fontSize='30px';var c=function(){return document.querySelector('body').innerHTML+='<div id="localFontChecker">'+b.outerHTML+'</div>'},d=function(){return document.querySelector('#localFontChecker span').offsetWidth},e=function(){return document.getElementById('localFontChecker').remove()};c();var f=d();e(),b.style.fontFamily=a,c();var g=d();return e(),f!=g};
@WeaverOfTheWeb
WeaverOfTheWeb / progresspics_flair_search_links.js
Created September 16, 2017 02:36
/r/ProgressPics Flair Search Links Fix