Skip to content

Instantly share code, notes, and snippets.

@ford-prefect
ford-prefect / aws-logs.sh
Last active January 4, 2022 18:41
CloudWatch downloader
#!/bin/bash
set -e
N_PAGES=${N_PAGES:-100}
AWS_REGION=${AWS_REGION:-us-west-2}
next=
for i in $(seq 1 "${N_PAGES}"); do
@kimberleehowley
kimberleehowley / share-video.html
Created April 14, 2021 19:31
A Daily hack for streaming a local video file during a call.
<html>
<head>
<title>stream local video file</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls" style="width: 50%; float: left; visibility: hidden">
<input id="vid-file-picker" type="file" accept="video/*"" />
<button onclick="shareVideo()" />share video through screenshare stream</button>
<hr />
@kwindla
kwindla / iot-sender.html
Created March 23, 2021 03:52
simple send-only Daily video API client with adjustable bandwidth
<html>
<head>
<title>send cam track and adjust bandwidth with a slider</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<!--
simple demo showing bandwidth slider in media-server-mode calls,
with no video rendering at all. simulcast is disabled so that
the client is sending only a single video stream. this means
@kwindla
kwindla / iot-receiver.html
Created March 23, 2021 03:50
simple receive-only Daily video API client
<html>
<head>
<title>send cam track and adjust bandwidth with a slider</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<!--
simple demo showing a client that only receives video
-->
@kwindla
kwindla / local-custom-video-stream.html
Created December 16, 2020 23:37
share local video files in a Daily API video call
<html>
<head>
<title>stream local video file</title>
<script src="https://unpkg.com/@daily-co/daily-js"></script>
</head>
<body onload="main()">
<div id="local-controls" style="width: 50%; float: left; visibility: hidden">
<input id="vid-file-picker" type="file" accept="video/*"" />
<button onclick="switchToVideo()" />switch to video for main stream</button>
<button onclick="switchToCamera()" />switch to camera for main stream</button>
## Where to find info and how to report on system extensions in macOS Catalina+
# Staged system extensions location in folder based on unique ID
/Library/SystemExtensions/
# Info on each
/Library/SystemExtensions/db.plist
Includes...
- state (enabled, activated, etc.)
- associated launchd plists
// Save the requirements Object in your console
const requirements = {'video': true, 'audio': true}
// Call navigator.mediaDevices.getUserMedia() passing in that object, and your camera should turn on.
navigator.mediaDevices.getUserMedia(requirements)
.then(stream => {
console.log('Yay, we’re streaming:', stream);
})
.catch(error => {
console.error('Whoops, could not access devices:', error);
let rtcConnection = null;
let rtcLoopbackConnection = null;
let loopbackStream = new MediaStream(); // this is the stream you will read from for actual audio output
const offerOptions = {
offerVideo: true,
offerAudio: true,
offerToReceiveAudio: false,
offerToReceiveVideo: false,
};
@jart
jart / printimage.c
Last active December 20, 2023 11:13
/*bin/echo ' -*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;coding:utf-8 -*-┤
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│
╞══════════════════════════════════════════════════════════════════════════════╡
│ To the extent possible under law, Justine Tunney has waived │
│ all copyright and related or neighboring rights to this file, │
│ as it is written in the following disclaimers: │
│ • http://unlicense.org/ │
│ • http://creativecommons.org/publicdomain/zero/1.0/ │
╚────────────────────────────────────────────────────────────────────'>/dev/null
if ! [ "${0%.*}.exe" -nt "$0" ]; then
@jwerle
jwerle / .gitignore
Last active March 15, 2019 00:48
compile javascript and encrypt into native module - blah
node_modules/
package-lock.json
plugin.c
plugin.node