Skip to content

Instantly share code, notes, and snippets.

View guest271314's full-sized avatar
💭
Fix WontFix

guest271314

💭
Fix WontFix
View GitHub Profile
@Vestride
Vestride / encoding-video.md
Last active March 12, 2024 16:41
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@voluntas
voluntas / webrtc.rst
Last active January 23, 2024 06:57
WebRTC の未来
@cure53
cure53 / wasm.md
Last active October 17, 2023 00:16
Calling alert from WASM

Calling alert from WebAssembly (WASM)

This very simple and minimal tutorial documents in a few easy steps how to play with WebAssembly (WASM) and get first results within minutes.

While the code below is mostly useless, it will show, how to call the alert function from within a WASM file and thus demonstrate how to import and export DOM objects.

Of course, this exercise has no real use. It is just meant to show, that getting started with WASM isn't hard. And there is no need for a complex build-chain, tons of tools or a dedicated VMs. Just use a browser, one online tool and that's it.

And Now?

@ssledz
ssledz / bash-cheat-sheet
Created May 21, 2016 14:36
BASH Cheat Sheet
B A S H C H E A T S H E E T
to page output forward (only): command filename | more
to page output forward & back: command filename | less
to print a dataset: lp datasetname (-d printerid) (-o landscape)
USE OF QUOTATION MARKS
echo "$varname" = echo The value of \$varname is \"$varname\"
= echo "The value of \$varname is \"$varname\"."
$fred='Four spaces between these words.'
/**
* RIFF WAVE PCM file generator
* Reference: www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
*
* @author Lara Sophie Schütt (@literallylara)
* @license CC0
*/
const DUR = 5 // duration in seconds
const NCH = 1 // number of channels
@laerciobernardo
laerciobernardo / hexIEEEtoFloat.js
Last active January 21, 2024 14:48
Convert Hexadecimal IEEE754 to Float in Javascript
var str = '0x41FC6733';
function parseFloat(str) {
var float = 0, sign, order, mantiss,exp,
int = 0, multi = 1;
if (/^0x/.exec(str)) {
int = parseInt(str,16);
}else{
for (var i = str.length -1; i >=0; i -= 1) {
if (str.charCodeAt(i)>255) {
@domenic
domenic / 1-service-worker.js
Last active October 20, 2022 11:10
Service worker stream transferring
"use strict";
const worker = new Worker("worker.js");
self.onfetch = e => {
const transform = new TransformStream(); // creates an identity transform
e.respondWith(new Response(transform.readable));
// Give the worker the writable end. An identity transform stream will just shuffle
// bytes written there into transform.readable.
@astoeckel
astoeckel / stream_local_audio.sh
Last active October 12, 2021 06:05
Stream audio from pulse audio as opus stream via UDP/RTP
#!/bin/sh
pacat \
--device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
--rate=48000 \
--record | \
opusenc \
--expect-loss=25 \
--max-delay=0 \
--framesize=2.5 \
@sttk
sttk / windowSize.html
Last active May 10, 2023 21:27
Window size
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Window Size</title>
<style>
html { font-size: 12px; }
div.fixed { position: fixed; left: calc(100% - 100px); top: 20px; }
div.fixed > a { font-size: 14px; }
</style>
@jimmywarting
jimmywarting / readme.md
Last active April 10, 2024 19:21
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers