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
#!/bin/sh | |
set -e | |
if [ $# -ne 1 ]; then | |
echo "Require one argument (the dot file)" | |
exit 255 | |
fi | |
tmpfile=$(mktemp "${1}.XXX") |
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
worker_processes auto; | |
rtmp_auto_push on; | |
events {} | |
rtmp { | |
server { | |
listen 1935; | |
listen [::]:1935 ipv6only=on; | |
application live { | |
live on; |
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
#!/bin/bash | |
set -e | |
if [ $# -ne 1 ]; then | |
echo "Usage: ${0} <recording.mp4>" | |
exit 255 | |
fi | |
oldfile="${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
<html> | |
<head> | |
<title>media ingest</title> | |
<script src="https://unpkg.com/@daily-co/daily-js"></script> | |
</head> | |
<body onload="main()"> | |
<div id="local-controls"> | |
<button id="join" onclick="joinAsOwner()">join room</button> | |
<button id="leave" onclick="leaveRoom()">leave room</button> |
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
#!/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 |
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
#!/bin/sh | |
update_sink() { | |
sink=$(pactl info | sed -n '/^Default Sink:/ s/.*: //p') | |
} | |
volume_up() { | |
update_sink | |
pactl set-sink-volume "$sink" +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
SectionVerb { | |
EnableSequence [ | |
cset "name='DAC Playback Switch' on" | |
# set this to the 0dB point if it's not 63 | |
cset "name='DAC Playback Volume' 63" | |
] | |
DisableSequence [ | |
cset "name='DAC Playback Switch' on" | |
cset "name='DAC Playback Volume' 0" |
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
# Use case Configuration for sof-hda-dsp | |
SectionVerb { | |
EnableSequence [ | |
cset "name='Auto-Mute Mode' 'Disabled'" | |
] | |
} | |
SectionDevice."Headphones" { | |
Comment "Headphones" |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <unistd.h> | |
#include <pulse/pulseaudio.h> | |
typedef struct { | |
pa_threaded_mainloop *loop; | |
pa_context *context; |
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
data BST = Node Int BST BST | Empty deriving (Show) | |
find :: BST -> Int -> Bool | |
find Empty x = False | |
find (Node v l r) x | |
| x < v = find l x | |
| x > v = find r x | |
| otherwise = True | |
insert :: BST -> Int -> BST |
NewerOlder