Skip to content

Instantly share code, notes, and snippets.

View jpopesculian's full-sized avatar

Julian Popescu jpopesculian

View GitHub Profile
@jpopesculian
jpopesculian / webrtc-options.md
Created January 25, 2016 21:31
Large Scale WebRTC Broadcast

Large Scale WebRTC Broadcast

The Problem

WebRTC is a protocol that has been standardized in recent years among major browsers like Chrome, Firefox, Opera and the Android Browsers. Plugins/Native Implementations are available on IE/Edge/Safari and iOS/Android basically providing a relatively global protocol for real time media streams. However WebRTC is a P2P protocol which means that if a user wishes to broadcast his/her video to multiple users he/she needs to individually send that broadcast to each participant. This works on a small scale, but degrades quickly on a large scale due to bandwidth deterioration.

The Solution

One possible solution is to let the user stream his/her media to a server and the server in turn splits the media streams to the subscribers. There are two technical ways to do this. A Selective Forwarding Unit (SFU) which simply forwards streams, and a Multipoint Control Unit (MCU) which essentially does the same thing but lowers bandwidth usage by packaging streams together.

@jpopesculian
jpopesculian / register_users.py
Last active December 6, 2022 12:32
Python Script to Register Users for rocket chat
import requests
HOST = "http://localhost:3000"
ADMIN_USERNAME = "jpopesculian"
ADMIN_PASS = "password"
NUM_USERS = 500
NUM_ROOMS = 2
@jpopesculian
jpopesculian / README.md
Created May 26, 2021 21:44
Import/Export CPS

To run the export from CPS use bash export and to run the import to CPS use bash import

To configure, you can use the the variables:

  • DATA_DIR: the output/input directory for the exported/imported session files
  • CPS_HOST: the hostname (and optional port) for the running CPS you would like to import/export from
@jpopesculian
jpopesculian / README.md
Last active July 30, 2021 12:33
CBOR to base64 public key

Setup

To setup, first create a virtual env

python3 -m virtualenv venv

activate the virtual env

@jpopesculian
jpopesculian / Makefile
Last active July 19, 2021 12:39
SGX Install
help:
@echo "View README for more info"
.PHONY: help
# SGX Driver
sgx-driver: install-sgx-driver sign-sgx-driver
install-sgx-driver:
curl -s https://download.01.org/intel-sgx/latest/linux-latest/distro/ubuntu20.04-server/driver_readme.txt | awk '{ print $$3 }' | grep -v "^#\|^$$" | head -n 1 | awk '{print "https://download.01.org/intel-sgx/latest/linux-latest/distro/ubuntu20.04-server/"$$1}' | xargs curl -o /tmp/install-sgx-driver
@jpopesculian
jpopesculian / Makefile
Created July 14, 2021 11:34
Zenroom Threaded Bug
CC=gcc
ZENDIR =../zenroom/src
LIBS=-lm -lpthread -lzenroom-x86_64
CFLAGS := -I$(ZENDIR) -L$(ZENDIR) -Wl,-rpath=$(ZENDIR) $(LIBS)
OBJ = main.o
BIN = main
$(BIN): $(OBJ)
@jpopesculian
jpopesculian / generate.sh
Created April 23, 2020 09:23
Generating Test PKI
#!/bin/sh
set -xe
rm -rf generated/
mkdir -p generated/
openssl ecparam -name prime256v1 -out generated/nistp256.pem
openssl ecparam -name secp384r1 -out generated/nistp384.pem
@jpopesculian
jpopesculian / .gitignore
Last active March 10, 2020 15:59
Python SGX utils sample
py_sgx_utils-0.1.0-py2.py3-none-linux_x86_64.whl
Pipfile
@jpopesculian
jpopesculian / .gitignore
Last active December 23, 2019 15:00
Javascript SGX remote attestation samples
node_modules
.env
@jpopesculian
jpopesculian / github.service
Created December 17, 2019 15:59
Diogos stupid service
[Unit]
Description=Github Service
[Service]
Type=simple
WorkingDirectory=/home/demo/ci-scone/actions-runner/
ExecStart=/bin/bash run.sh
User=demo
[Install]