Skip to content

Instantly share code, notes, and snippets.

View TroyKomodo's full-sized avatar
🎯
Focusing

Troy TroyKomodo

🎯
Focusing
View GitHub Profile
@TroyKomodo
TroyKomodo / xLiveSDK.ts
Last active February 2, 2024 16:38
XLive SDK Interface
interface Window {
X_LIVE_SDK: XLiveSDK;
}
/**
* A user account
* @property {string} id - The unique identifier for the user
* @property {string} name - The username of the user (unique)
* @property {string} displayName - The display name of the user
* @property {string} avatarUrl - The avatar URL for the user
@TroyKomodo
TroyKomodo / 7TV_CLA.md
Last active January 24, 2024 19:38
7TV CLA

7TV Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by 7TV or its affiliates (“7TV LTD”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to 7TV in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to 7TV a non-exclusive, perpetual, irrevocable, worldwid

AMD Alveo MA35 Ubuntu 23.x driver patch

Steps

  1. Assuming you have followed the guide here and are now on the "Install the AMD AMA Video SDK" step.

Start by installing the following

sudo apt -y install dkms libhugetlbfs0 libboost-all-dev
@TroyKomodo
TroyKomodo / rmq.rs
Last active April 25, 2024 09:33
rmq connection pool
use std::{
sync::{atomic::AtomicUsize, Arc},
time::Duration,
};
use anyhow::{anyhow, Result};
use arc_swap::ArcSwap;
use async_stream::stream;
use futures::{Stream, StreamExt};
use lapin::{
@TroyKomodo
TroyKomodo / SCUFFLE_CLA.md
Last active January 31, 2023 23:12 — forked from CLAassistant/SAP_CLA
Scuffle Individual Contributor License Agreement

Scuffle Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Scuffle or its affiliates (“ScuffleTV”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Scuffle in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to Scuffle a non-exclusive, perpetual

@TroyKomodo
TroyKomodo / create-vm.sh
Created December 4, 2021 03:35
A script to create a virtual machine
#!/bin/bash
echo "Configure a virtual machine!";
NAME=""
HOSTNAME=""
SSH=""
PASSWORD=""
SSH_PWAUTH="true"
ROOT_LOGIN="yes"
NETWORK=""
@TroyKomodo
TroyKomodo / gist:1155456b02f1a02ac8691b1d7061393f
Created December 18, 2020 12:00
Dual audio channel RTMP
ffmpeg -i "srt://127.0.0.1:5000/live?mode=listener" -filter_complex "[0:1]channelsplit=channel_layout=stereo[a1l][a1r];[0:1]channelsplit=channel_layout=stereo[t1][t2];[0:2]channelsplit=channel_layout=stereo[a2l][a2r];[a1l][a1r][t1][t2][a2l][a2r]join=inputs=6:channel_layout=5.1[a]" -c:a aac -c:v copy -map 0:v -map [a] -f flv rtmp://127.0.0.1:5001
ffmpeg -i -listen 1 rtmp://127.0.0.1:5001 -filter_complex "channelsplit=channel_layout=5.1[FL][FR][FC][LFE][BL][BR];[FL][FR]join=inputs=2:channel_layout=stereo[a1];[BL][BR]join=inputs=2:channel_layout=stereo[a2];[LFE][FC]join=inputs=2:channel_layout=stereo[a3]" -map "[a1]" -map "[a2]" -map 0:v out.mp4 -map "[a3]" -f null -
Produces an MP4 file with 2 audio tracks after being sent via the RTMP protocol.
@TroyKomodo
TroyKomodo / .bashrc
Created October 30, 2020 11:53
Color Unix Terminal
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace