Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Fix WontFix

guest271314

💭
Fix WontFix
View GitHub Profile
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
@guest271314
guest271314 / background.js
Created Jul 2, 2022
Node.js Native Messaging Host Memory Usage
View background.js
/*
port = chrome.runtime.connectNative('node_native_messaging_host_memory_usage');
port.onMessage.addListener((message)=>{
console.log(message);
});
port.onDisconnect.addListener(()=>{
if (chrome.runtime.lastError) {
console.log(chrome.runtime.lastError.message)
}
@guest271314
guest271314 / ctrl_v_google_image_search.js
Created May 7, 2022
Google Images Search with Ctrl+V
View ctrl_v_google_image_search.js
// https://twitter.com/ericlaw/status/1521939256574423044
document.onpaste = async (e) => {
async function handlePaste(file) {
const url = 'https://www.google.com/searchbyimage/upload';
const fd = new FormData();
fd.append('hl', navigator.languages[navigator.languages.length - 1]);
fd.append('filename', file.name);
// fd.append('image_content', file, file.name);
fd.append('encoded_image', file, file.name);
const request = await fetch(url, {
@guest271314
guest271314 / native_messaging_bash_string_echo.sh
Created Apr 25, 2022
Bash Native Messaging host. Echo JSON string that does not include (escaped) double quotes.
View native_messaging_bash_string_echo.sh
#!/bin/bash
# Bash Native Messaging host, guest271314 2022
# Echo JSON string that does not include (escaped) double quotes
# https://stackoverflow.com/a/24777120
sendMessage() {
message=\"$1\"
# Calculate the byte size of the string.
# NOTE: This assumes that byte length is identical to the string length!
# Do not use multibyte (unicode) characters, escape them instead, e.g.
@guest271314
guest271314 / UntarFileStream.js
Created Apr 10, 2022
js-untar as Ecmascript Module
View UntarFileStream.js
// UntarFileStream.js
// Based on https://github.com/InvokIT/js-untar/blob/master/src/untar-worker.js
// guest271314 4-9-2022
/*
// Usage
let response = (
await fetch('https://nodejs.org/dist/v17.9.0/node-v17.9.0-linux-x64.tar.gz')
).body;
let decompressedBuffer = await new Response(
await response.pipeThrough(new DecompressionStream('gzip'))
@guest271314
guest271314 / tts_service_x86_64.nexe.txt
Created Mar 14, 2022
strings tts_service_x86_64.nexe
View tts_service_x86_64.nexe.txt
This file has been truncated, but you can view the full file.
NaCl
x86-64
N24speech_patts_chrome_nacl15NaClTtsInstanceE
speech/tts/platforms/chrome_nacl/nacl_main.cc
NaClTtsInstance::HandleMessage no method
startService
speak
stop
status
View background.js
async function persistServiceWorker(src) {
return new Promise((resolve) => {
const removeFrames = (close = false) => {
for (const frame of document.querySelectorAll(
`[src="${src}index.html"]`
)) {
frame.parentNode.removeChild(frame);
}
if (close) {
port.postMessage('close');
@guest271314
guest271314 / index.html
Created Jan 13, 2022
Persistent ServiceWorker
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Persistent ServiceWorker</title>
<style>
body *:not(script) {
display: block;
white-space: pre;
}
</style>
@guest271314
guest271314 / README.md
Last active Nov 2, 2021
WebTransport crashes the tab, does not stream data
View README.md

WebTransport crashes tab on Chromium 97 when attempting to stream data.

@guest271314
guest271314 / mediastreamtrack_does_not_render_silence.html
Created Oct 31, 2021
MediaStreamTrack does not render silence on Chromium
View mediastreamtrack_does_not_render_silence.html
<!DOCTYPE html>
<html>
<head>
<title>MediaStreamTrack does not render silence on Chromium</title>
<!-- https://bugs.chromium.org/p/chromium/issues/detail?id=1262796 -->
<!-- https://www.w3.org/TR/mediacapture-streams/#life-cycle-and-media-flow -->
</head>
<body>