Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Fix WontFix

guest271314

💭
Fix WontFix
View GitHub Profile
@guest271314
guest271314 / native_messaging_javascript_runtime_tests.md
Last active January 8, 2023 05:55
Native Messaging JavaScript runtime tests
View native_messaging_javascript_runtime_tests.md

Native Messaging JavaScript runtime hosts tested:

  • QuickJS
  • Node.js
  • Deno
  • Bun

Test: Send new Array(10000) from client to host, send message back to client, 100 times, measure time with performance.now().

@guest271314
guest271314 / capture_monitor_devices_at_chromium_and_chrome_on_linux.md
Created December 12, 2020 18:43
Capture monitor devices with navigator.mediaDevices.getUsermedia() at Chromium and Chrome on Linux
@guest271314
guest271314 / opus-tools_static_build.sh
Last active November 6, 2022 16:35 — forked from spvkgn/opus-tools_static_build.sh
Script to build a statically linked opus-tools from github
View opus-tools_static_build.sh
#!/bin/sh
# ==============================================================
# Script to build a statically linked version of opus-tools
# https://gist.github.com/spvkgn/60c12010d4cae1243dfee45b0821f692
#
# https://github.com/xiph/ogg.git
# https://github.com/xiph/opus.git
# https://github.com/xiph/opusfile.git
# https://github.com/xiph/opus-tools.git
@guest271314
guest271314 / background.js
Created November 4, 2022 01:54
Stream same data to all non-chrome tabs
View background.js
const start = new Date();
let streams = [];
let data = [...Array(1000)].map((_, i) => i);
let encoder = new TextEncoder();
let resolve;
let promise = new Promise((_) => (resolve = _));
let readable = new ReadableStream({
start: async (_) => {
// console.log('Original stream');
return promise;
@guest271314
guest271314 / background.js
Created October 29, 2022 02:33
ScreenshotTest
View background.js
// https://www.reddit.com/r/learnjavascript/comments/yeodfh/chrome_extension_error_extensionsjs2897_uncaught/
// Use a Port for multiple messages
chrome.runtime.onConnect.addListener((port) => {
console.log(port);
port.onMessage.addListener(async (message) => {
if (message.name === 'stream' && message.streamId) {
console.log(message.streamId);
try {
const stream = await navigator.mediaDevices.getUserMedia({
video: {
@guest271314
guest271314 / SetFileList.html
Last active October 18, 2022 09:49
Set the FileList of <input type="file"> to arbitrary File objects
View SetFileList.html
<!DOCTYPE html>
<!-- guest271314 11-12-2017 -->
<!-- see https://stackoverflow.com/questions/47119426 -->
<html>
<head>
</head>
<body>
<script>
@guest271314
guest271314 / fetch-node-nightly-executable.js
Created July 9, 2022 01:18
Fetch node nightly executable
View fetch-node-nightly-executable.js
let fileSystemHandle = await showSaveFilePicker({ suggestedName: 'node' }),
writable,
writer,
file;
let status = await fileSystemHandle.requestPermission({ mode: 'readwrite' });
let osArch = 'linux-x64';
// https://github.com/InvokIT/js-untar/
class PaxHeader {
constructor(fields) {
this._fields = fields;
@guest271314
guest271314 / The_insanity_of_censorship.txt
Created July 4, 2022 17:28
The insanity of censorship
View The_insanity_of_censorship.txt
"Sun, Jul 3, 3:22 PM
Hi guest271314, Your account, @guest271314 has been locked for violating the Twitter Rules.
Specifically for: Violating our rules against hateful conduct.
You may not promote violence against, threaten, or harass other people on the basis of race,
ethnicity, national origin, sexual orientation, gender, gender identity, religious affiliation,
age, disability, or serious disease.
avatar guest271314 @guest271314