Skip to content

Instantly share code, notes, and snippets.


Émilien Devos unixfox

View GitHub Profile
unixfox /
Last active Jan 8, 2023
nats jetstream cluster

NATS JetStream Playground

Playground for a Secure, Highly Available NATS Cluster with message persistence (using JetStream).

This repo contains a cluster with 3 nodes and a Go client sending/receiving messages to it.


To use this repo, please install:

  • Docker
  • mkcert (zero-config tool for locally-trusted development certificates)
unixfox / docker-compose.yml
Last active Jan 8, 2023
example mysql innodb cluster docker
View docker-compose.yml
version: '3'
hostname: mysql-server-1
- mysql-server.env
image: mysql/mysql-server:8.0.31
- ./data-server1:/var/lib/mysql
unixfox / loki-config.yaml
Created Dec 21, 2022
loki example config
View loki-config.yaml
auth_enabled: false
http_listen_port: 3100
grpc_listen_port: 9096
path_prefix: /data/loki
unixfox /
Created Oct 9, 2022
dnscrypt-proxy get sdns

dnscrypt-proxy -list-all -json -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml

unixfox /
Last active Aug 24, 2022
Findings about youtube IP restriction
  • you can load the same URL without any redirect on the same /48 IPv6 subnet
  • as long as it's still the same ISP you can load the same URL but you will get a strange redirect with content-type plain/text with the new URL to use
  • on any change in the IP address that doesn't concern the two first points will trigger a request to the player endpoint for new video streams
unixfox /
Last active Nov 11, 2022
Different ways to get json output from Google servers API
  • When async something is in the URL, add/modify async=_fmt:json.
  • You can try the query string alt=json for some APIs like the youtube one
  • You can also try the query string fmt=json
  • For some API, get the JSON result by modifying the client name used. Example:

    So, short version: curl "" -H "user-agent: Mozilla/5.0 AppleWebKit/537.36 GSA/" -output trend.proto It seems that it combines geoIP with the field &hl= in order to decide which trends to show, and perhaps also gl= It allows for three different clients in order to get json, ajax-json or protobuffer. Respectively, qsb-android, qsb-android-asbl and qsb-android-asbl-pb

unixfox /
Last active Aug 6, 2022
Dirty script for checking the hash of a youtube video stream in 320P
  1. install nodejs
  2. install the library got: npm install got
  3. launch the script with bash

I replicated the issue on a Digitalocean droplet in UK location with IPv6 disabled and the DNS server set to if one wants to have an environment to the one that I used.

unixfox / basicinfo.txt
Created Aug 6, 2022
Replicable issue with The Following content is not available on this app.
View basicinfo.txt
visitorData: CgtVLWpkSnB1dTdPayjwnbuXBg%3D%3D
sha256: 18ee5921d02af80021114e85605533760df978ca638c810b8b228753556f37fd
dns ip of youtube server used: 142.25
  1. Update the PKGBUILD
  2. makepkg --printsrcinfo > .SRCINFO
  3. git add PKGBUILD .SRCINFO
  4. git commit
  5. git push
unixfox / route48.conf
Created May 18, 2022
route48 example wireproxy
View route48.conf
PrivateKey = xxx
Address = 2axxx/128
PublicKey = xxxx
AllowedIPs = ::/1, 8000::/1
Endpoint =
PersistentKeepalive = 25