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
set -exuo pipefail | |
LIVESTREAM_URL=$1 | |
if [[ ! $# -eq 1 ]]; then | |
echo "usage: $0 <URL>" | |
exit 1 | |
fi | |
# Referencing FFMpeg to Icecast2 Streaming Sample Gist: https://gist.github.com/keiya/c8a5cbd4fe2594ddbb3390d9cf7dcac9 | |
URL=$(streamlink $LIVESTREAM_URL worst --stream-url) | |
channels=2 |
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> | |
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script> | |
</head> | |
<body> |
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
/* | |
* ESP8266 Web server with Web Socket to control an LED. | |
* | |
* The web server keeps all clients' LED status up to date and any client may | |
* turn the LED on or off. | |
* | |
* For example, clientA connects and turns the LED on. This changes the word | |
* "LED" on the web page to the color red. When clientB connects, the word | |
* "LED" will be red since the server knows the LED is on. When clientB turns | |
* the LED off, the word LED changes color to black on clientA and clientB web |
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
<configSections> | |
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/> | |
</configSections> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<targets> | |
<target name="console" xsi:type="Console" layout="${longdate} ${callsite} ${level} ${message}"/> | |
<target name="logfile" xsi:type="File" fileName="C:\temp\log.txt" layout="${longdate} ${callsite} ${level} ${message}"/> | |
<target name="rotatelog" xsi:type="File" | |
layout="${longdate} ${logger} ${message}" | |
fileName="c:/temp/logs/alogfile.txt" |
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
location /resize { | |
alias /tmp/nginx/resize; | |
set $width 150; | |
set $height 100; | |
set $dimens ""; | |
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
set $width $1; | |
set $height $2; | |
set $image_path $3; |