Skip to content

Instantly share code, notes, and snippets.

View kyob's full-sized avatar

kyob

View GitHub Profile
@kyob
kyob / stream-rstp-to-youtube.sh
Last active December 16, 2023 20:48
Stream video from IP camera to youtube via ffmpeg
#!/bin/bash
RTSP_URL="rtsp://login:password@[ip]:554/cam/realmonitor?channel=1&subtype=1"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
YOUTUBE_KEY="put your key"
screen -d -m ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i ${RTSP_URL} -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a mp3 -strict experimental -f flv ${YOUTUBE_URL}/${YOUTUBE_KEY}
<?php
$mysqli_remote = new mysqli("rhost", "rlogin", "rpass", "rdb");
mysqli_local = new mysqli("lhost", "lroot", "lpass", "ldb");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$sqlt = "TRUNCATE TABLE radcheck";
@kyob
kyob / discovery_se600.txt
Created February 16, 2017 10:03
for librenms
LibreNMS Discovery
Version info:
Commit SHA: d06aaaa222fefc083dd1c60dce1ad1cbbaf8100b
DB Schema: 164
PHP: 7.0.15
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
SQL[SELECT version FROM `dbSchema` ORDER BY version DESC LIMIT 1]
@kyob
kyob / poller_se600.txt
Created February 16, 2017 10:05
for librenms
LibreNMS Poller
Version info:
Commit SHA: d06aaaa222fefc083dd1c60dce1ad1cbbaf8100b
Commit Date: 1487233120
DB Schema: 164
PHP: 7.0.15
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
./discovery.php -h 10.10.10.10 -d -m sensors
LibreNMS Discovery
Version info:
Commit SHA: ca2662fead1a54ba4f3879863bdb7ced7168016b
DB Schema: 165
PHP: 7.0.15
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
LibreNMS Discovery
Version info:
Commit SHA: ca2662fead1a54ba4f3879863bdb7ced7168016b
DB Schema: 165
PHP: 7.0.15
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
SQL[SELECT version FROM `dbSchema` ORDER BY version DESC LIMIT 1]
LibreNMS Poller
Version info:
Commit SHA: ca2662fead1a54ba4f3879863bdb7ced7168016b
Commit Date: 1487677077
DB Schema: 165
PHP: 7.0.15
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
LibreNMS Discovery
Version info:
Commit SHA: ca2662fead1a54ba4f3879863bdb7ced7168016b
DB Schema: 165
PHP: 7.0.15
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
SQL[SELECT version FROM `dbSchema` ORDER BY version DESC LIMIT 1]
LibreNMS Discovery
Version info:
Commit SHA: 46198b2caa30e4e7a2848da6aa94256e9bff77e6
DB Schema: 172
PHP: 7.0.16
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!
SQL[SELECT version FROM `dbSchema` ORDER BY version DESC LIMIT 1]
LibreNMS Poller
Version info:
Commit SHA: 46198b2caa30e4e7a2848da6aa94256e9bff77e6
Commit Date: 1488441869
DB Schema: 172
PHP: 7.0.16
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
DEBUG!