Skip to content

Instantly share code, notes, and snippets.

# Raspberry Pi 3 + camera-streamer: /video, /video*, /webrtc endpoints not working
## Symptoms
- `/stream` endpoint works fine (MJPEG)
- `/video`, `/video.mp4`, `/video.mkv` endpoints return errors
- `/webrtc` endpoint not working
- USB webcam connected, camera-streamer running
- Switching to `resolution: 1920x1080` breaks even MJPEG, returning to 720p fixes /stream
## Root Cause
@asvdvl
asvdvl / nginx proxy from v4 clients to v6 servers
Created January 25, 2025 04:04
config for support of v4 web clients, requires dns server which gives only v6 protocol, otherwise this config turns into a regular reverse proxy which is also a valid way of use. dnsdist config which gives A record of this proxy to clients when in the higher one there is only AAAA you can find [here]()(not ready yet)
server {
listen 10.0.0.2:80;
# server_name *.asv.l asv.l; #if you only need to allow certain server names
server_name _;
location / {
#if you have a dns server that only gives v6 responses, which should be proxied, specify it here
resolver [2001:0db8::d4e6] valid=300s;
set $upstream_host $host;
add_header X-Server-ID "v6proxy";
{% for service in queryset %}{% for ipa in service.ipaddresses.all() %}
{{ ipa.address.ip }} {{ service.name }}
{% endfor %}{% endfor %}
# exporting example:
# 10.0.0.1 www
# 2001:0db8::1 www
# 2001:0db8::2 netbox
--[[
So, let's assume the following situation: you have native IPv4 from your provider,
but you get IPv6 from a tunnel broker, such as Hurricane Electric (located in another country).
After setting things up, you notice that when making DNS requests(ipv6.google.com is good example for me) over IPv4,
you receive one answer for an AAAA query, but over IPv6, you get a completely different answer.
Most likely, the DNS gave you the server closest to you. This can create problems where traffic crosses the border twice,
resulting in poor speed and high latency.
To solve this problem, I used `dnsdist`: all AAAA record queries are routed to the IPv6 pool,
and all other requests go through IPv4.
apt install unzip
unzip BlendFarm.Server-1.1.6-Linux64.zip
rm BlendFarm.Server-1.1.6-Linux64.zip
adduser blendfarm
systemctl edit --full --force blendfarm
#paste:
[Unit]
Description=BlendFarm Service
After=network.target
@asvdvl
asvdvl / dsLinkCorrector.sh
Last active October 26, 2023 00:03
Discord: removing idiotic parameters from a link
#!/bin/bash
#FIRST, this script is only for Linux, download, run something like this: `./dsLinkCorrector.sh`, required clipnotify(https://github.com/cdown/clipnotify)
#How it works: when copying (primary/clipboard), it corrects the link and places it in the primary buffer (pasting on the mouse wheel or ctrl+v)
#what is he doing:
##checks that this is really a cdn discord link
##removes everything after the `?` sign (cdn parameters)
##changes media.discordapp.net to cdn.discordapp.com and removes sizing overrides
cdnCheck="https\S+(cdn|media)\.discord"
@asvdvl
asvdvl / jvm
Created November 4, 2021 14:30 — forked from A-So-Nya/jvm
JVM-аргуменнты
Source: https://cwelth.com/manuals.php?mid=2
Руководство по аргументам запуска Java
Руководство, которое поможет вам попробовать оптимизировать мои (и не только мои) сборки для запуска на слабых компьютерах путем использования аргументов запуска java для minecraft. Однако, владельцы мощных компьютеров тоже смогут почерпнуть для себя что-нибудь полезное. Например, некоторые флаги потенциально помогут избавиться от мелких неприятных пролагиваний.
Отказ от ответственности:
Это руководство является переводом алгоритма оптимизации Java "Paul's Reborn Neonate" и поможет оптимизировать работу майнкрафта как для ваниллы, так и для модпаков.
Все потенциальные ухудшения в производительности остаются на совести автора оригинального алгоритма. Я не несу ответственность за корректную работоспособность перечисленных ниже параметров запуска. Все флаги, описанные в данном руководстве, читатель использует на свой страх и риск.
@asvdvl
asvdvl / snipets.lua
Last active July 19, 2021 21:06
Snipets for opencomputers
--This file is parts of different codes for different tasks
local cmp = require("component")
--get information from gt_batterybuffer
local current, total = 0, 0
local bb = cmp.proxy(--[[bbaddr]])
local current = current + string.gsub(bb.getSensorInformation()[3], "([^0-9]+)", "")
local total = total + string.gsub(bb.getSensorInformation()[4], "([^0-9]+)", "")
--get information from multiple gt_batterybuffer
@asvdvl
asvdvl / dbg.lua
Created May 28, 2021 19:49 — forked from Fingercomp/dbg.lua
A better debug.debug()
moved to https://github.com/asvdvl/asvlibs/blob/master/asv/dbg.lua