Operation | Webdav | REST |
---|
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
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice | |
stun: | |
stun.l.google.com:19302, | |
stun1.l.google.com:19302, | |
stun2.l.google.com:19302, | |
stun3.l.google.com:19302, | |
stun4.l.google.com:19302, | |
stun.ekiga.net, | |
stun.ideasip.com, |
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
// https://blog.logrocket.com/build-video-streaming-server-node/ | |
router.get('/video/:id', (req, res) => { | |
const videoPath = `assets/${req.params.id}.mp4`; | |
const videoStat = fs.statSync(videoPath); | |
const fileSize = videoStat.size; | |
const videoRange = req.headers.range; | |
if (videoRange) { | |
const parts = videoRange.replace(/bytes=/, "").split("-"); | |
const start = parseInt(parts[0], 10); | |
const end = parts[1] |
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
const link = window.prompt("Enter URL"); | |
fetch("http://127.0.0.1:6800/jsonrpc", { | |
method: "POST", | |
headers: { | |
"content-type": "application/x-www-form-urlencoded" | |
}, | |
body: JSON.stringify({ | |
jsonrpc: "2.0", | |
id: "someID", | |
method: "aria2.addUri", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Peer-to-Peer Cue System --- Reciever</title> | |
<style> | |
body { | |
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; |
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
const zlib = require('zlib'); | |
async function deflate(data) { | |
const encoder = new TextEncoder(); | |
const input = encoder.encode(data); | |
const deflatedChunks = []; | |
const compressionStream = new CompressionStream('deflate'); | |
const writableStream = new WritableStream({ | |
write(chunk) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Chart.js Web Component</title> | |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
</head> | |
<body> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env node | |
// websocketd --port 8058 ./mocker.js | |
const querystring = require('querystring'); | |
const qs = process.env?.QUERY_STRING.replace('QUERY_STRING=', ''); | |
const qsObj = querystring.parse(qs); | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); |
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
const readline = require('readline'); | |
const readLineAsync = () => { | |
const rl = readline.createInterface({ | |
input: process.stdin | |
}); | |
return new Promise((resolve) => { | |
rl.prompt(); | |
rl.on('line', (line) => { |