Skip to content

Instantly share code, notes, and snippets.

View tab1293's full-sized avatar

Tom Berger tab1293

View GitHub Profile
@tab1293
tab1293 / main.go
Created September 27, 2022 18:29
Pion H264 write to disk
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os/exec"
"strings"
"time"
@tab1293
tab1293 / gist:c308ee12930915727dd17d0e307e7eec
Created September 22, 2022 15:44
yarn dev:web error when linking ion-sdk-js without tsconfig update
exports is not defined
ReferenceError: exports is not defined
at eval (webpack-internal:///../../../ion-sdk-js/lib/client.js:70:1)
at ../../../ion-sdk-js/lib/client.js (https://localhost:3001/_next/static/chunks/pages_room_Room_tsx.js:664:1)
at options.factory (https://localhost:3001/_next/static/chunks/webpack.js?ts=1663861436114:655:31)
at __webpack_require__ (https://localhost:3001/_next/static/chunks/webpack.js?ts=1663861436114:37:33)
at fn (https://localhost:3001/_next/static/chunks/webpack.js?ts=1663861436114:324:21)
at eval (webpack-internal:///../../../ion-sdk-js/lib/index.js:6:16)
at ../../../ion-sdk-js/lib/index.js (https://localhost:3001/_next/static/chunks/pages_room_Room_tsx.js:675:1)
at options.factory (https://localhost:3001/_next/static/chunks/webpack.js?ts=1663861436114:655:31)
Games Today
Query Start Time: Thu, 07 Jul 2022 20:00:00 EDT
Query Stop Time: Fri, 08 Jul 2022 20:00:00 EDT
+--------+----------------------+----------------------+-------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| LEAGUE | AWAY TEAM | HOME TEAM | START TIME | NETWORKS | IPTV CHANNELS |
+--------+----------------------+----------------------+-------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------
@tab1293
tab1293 / bad.txt
Last active July 1, 2022 16:25
Google blocking puppeteer
Request that gets blocked (Returns a 302)
curl 'https://accounts.google.com/v3/signin/identifier?continue=https://www.youtube.com/signin?action_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den%26next%3D%252F%26feature%3Dshortcut&dsh=S1695201827:1656692488316782&flowEntry=ServiceLogin&flowName=WebLiteSignIn&hl=en&ifkv=AX3vH39jE-SX404K-YCCa3HaZasQONgw8tTSjl1eBxNsNxqJKqkw71GfcDa5Or3geCxttunm6_jlUA&service=youtube' \
-H 'authority: accounts.google.com' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'cache-control: max-age=0' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'cookie: __Host-GAPS=1:jxYp-R98VhWYOu56AdPM18uTFkPJ-w:o6_7bHtwWFxFQ7yU; NID=511=rv7F8vjYlTz1q7bntmbsyaoTTGK8cZqu5yLiOG2GapM0qpQRm9312m6o35WhdYP96o8Ic2w2Q61lRenpeyXq6X_AGF4RCN-5QKKfpKY7iaSSMo-_3B0PzLLOaH4P0GMLDg59Z35Z4ljWFOltBWCod19VE6Od-2_iyKns7YDPYAQ' \
-H 'origin: https://ac
turnserver 232281 [007] 88065.594950: skb:kfree_skb: skbaddr=0xffff970391b47f00 protocol=2048 location=0xffffffff96df99a0
ffffffff96d121a6 kfree_skb+0x76 ([kernel.kallsyms])
ffffffff96d121a6 kfree_skb+0x76 ([kernel.kallsyms])
ffffffff96df99a0 udp_queue_rcv_one_skb+0x3c0 ([kernel.kallsyms])
ffffffff96df9b3f udp_queue_rcv_skb+0x3f ([kernel.kallsyms])
ffffffff96df9d16 udp_unicast_rcv_skb.isra.0+0x76 ([kernel.kallsyms])
ffffffff96dfad1b __udp4_lib_rcv+0x56b ([kernel.kallsyms])
ffffffff96dfb78a udp_rcv+0x1a ([kernel.kallsyms])
ffffffff96dbf885 ip_protocol_deliver_rcu+0xc5 ([kernel.kallsyms])
ffffffff96dbf9b8 ip_local_deliver_finish+0x48 ([kernel.kallsyms])
@tab1293
tab1293 / error.log
Last active August 13, 2021 15:34
GORM Circular Foreign Key Issue
2021/08/13 09:58:54 /Users/tom/go/pkg/mod/gorm.io/driver/postgres@v1.1.0/migrator.go:157 ERROR: relation "logins" does not exist (SQLSTATE 42P01)
[16.528ms] [rows:0] CREATE TABLE "users" ("id" varchar(36),"name" text,"last_login_id" varchar(36),PRIMARY KEY ("id"),CONSTRAINT "fk_users_last_login" FOREIGN KEY ("last_login_id") REFERENCES "logins"("id"))
2021/08/13 09:58:54 Failed to auto migrate, but got error ERROR: relation "logins" does not exist (SQLSTATE 42P01)
@tab1293
tab1293 / custom_build_run_instructions.md
Last active May 18, 2021 14:10
Custom build run instructions

Custom build run instructions

Make sure any previous Playback folders or zip files are removed in your Downloads folder before doing the following steps

  1. Download custom build to your Downloads folder : https://storage.googleapis.com/playback-cdn/dynamic-sys-info-build/Playback-darwin-x64.zip
  2. Unzip in your Downloads folder
  3. Open terminal
  4. Run in terminal rm ~/Library/Logs/Playback/main.log
  5. Run in terminal xattr -dr com.apple.quarantine ~/Downloads/Playback-darwin-x64/Playback.app
  6. Run in terminal ~/Downloads/Playback-darwin-x64/Playback.app/Contents/MacOS/Playback > ~/Downloads/playback.log 2>&1
  7. Make sure your webcam is off
  8. Open a few different streams in the app that have different resolutions. Let each stream resolution play for about a minute. This is a good Youtube video to use: https://youtu.be/4oTrssAn7xI?t=106
@tab1293
tab1293 / publisher.html
Created February 5, 2021 17:16
ION SFU example
<html>
<head>
<script src="/ion.min.js"></script>
<script src="/json-rpc.min.js"></script>
</head>
<body>
<video id="video" src="test.mp4" width="1280px" height="720px" controls />
</body>
<script>
const v = document.getElementById("video");
@tab1293
tab1293 / nack_race.log
Created February 1, 2021 19:09
Pion NACK interceptor race
==================
WARNING: DATA RACE
Read at 0x00c00037601a by goroutine 103:
github.com/pion/interceptor/pkg/nack.(*sendBuffer).get()
/go/pkg/mod/github.com/pion/interceptor@v0.0.8/pkg/nack/send_buffer.go:64 +0x8b
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets.func1()
/go/pkg/mod/github.com/pion/interceptor@v0.0.8/pkg/nack/responder_interceptor.go:104 +0x59
github.com/pion/rtcp.(*NackPair).Range()
/go/pkg/mod/github.com/pion/rtcp@v1.2.6/transport_layer_nack.go:64 +0x54
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets()
@tab1293
tab1293 / download_ok.log
Created June 9, 2020 14:25
Not seeing peer connections occasionally on download start anacrolix/torrent issue logs
This file has been truncated, but you can view the full file.
2020-06-09T13:53:49+0000 NONE upnp.go:154: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on eth0
2020-06-09T13:53:49+0000 NONE upnp.go:154: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on eth0
2020-06-09T13:53:49+0000 NONE upnp.go:175: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on eth0
2020-06-09T13:53:49+0000 NONE upnp.go:189: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on eth0
2020-06-09T13:53:49+0000 NONE upnp.go:175: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on eth0
2020-06-09T13:53:49+0000 NONE upnp.go:189: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on eth0
2020-06-09T13:53:50+0000 NONE torrent.go:1527: "Torrent Name": hashed piece 0 (passed=false)
2020-06-09T13:53:50+0000 NONE torrent.go:1092: "Torrent Name": piece 0