Given two images a frame and a content. Calculate transform matrix for picture in picture that will fit the content into the frame.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function hash(s: string) { | |
return [].reduce.call(s, (p, c) => (p << 5) - p + c.charCodeAt(0), 0) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Signaller { | |
send(data: unknown): void; | |
onmessage(data: unknown): void; | |
} | |
const ls = { | |
send: (x) => rs.onmessage(x), | |
} as Signaller; | |
const rs = { | |
send: (x) => ls.onmessage(x), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function generateId() { | |
return new Date().getTime().toString(36) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymupdf, sys, re | |
doc = pymupdf.open(sys.argv[1]) | |
for xref in range(1, doc.xref_length()): | |
pattern = r"(/Private /Watermark)|(/Name \(Watermark\))" | |
text = doc.xref_object(xref) | |
if re.search(pattern, text): | |
doc._deleteObject(xref) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Roblox muilti-instancer | |
# v0.1.0 | |
$createdMutex = $false | |
New-Object System.Threading.Mutex($true, "ROBLOX_singletonMutex", [ref] $createdMutex) | |
if (-Not $createdMutex) { | |
Write-Host "Please close all Roblox instances." -ForegroundColor Red | |
} else{ | |
Write-Host "Now you can open multiple Roblox instances." -ForegroundColor Green |
- Landing page example - https://flashsha.re
- Space flight animation - https://github.com/vsDizzy/fly-space
- Audio visualizer - https://github.com/vsDizzy/audio-freq-sample
- WebGL POC - https://github.com/vsDizzy/webgl
- Drag items POC - https://github.com/vsDizzy/drag-app
- React hot reload POC - https://github.com/vsDizzy/react-refresh-poc
- RPC library - https://github.com/vsDizzy/rpc-lib
- Library converting Chrome callbacks to promises - https://github.com/vsDizzy/chrome-async