Skip to content

Instantly share code, notes, and snippets.

View cameronelliott's full-sized avatar

Cameron Elliott cameronelliott

View GitHub Profile
#include <srtp2/auth.h>
#include <srtp2/cipher.h>
#include <srtp2/crypto_types.h>
#include <srtp2/srtp.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
char SKEL_RTP_PACKET[17] = {0x80, 0x60, 0x69, 0x8f, 0xd9, 0xc2, 0x93, 0xda, 0x1c, 0x64, 0x27, 0x82, 0x98, 0x36, 0xbe, 0x88, 0x9e};
@cameronelliott
cameronelliott / README.md
Created October 23, 2022 20:26 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@cameronelliott
cameronelliott / twoip.sh
Last active October 19, 2022 02:36 — forked from sparkcodeuk/floating-ip-gateway.sh
Digital Ocean show how to use two IP addresses
#!/bin/bash
NET_INT="eth0"
CURL_TIMEOUT=3
echo -n "Setting floating IP as the default gateway: "
# Check there's a floating IP attached to this droplet
if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then
echo "Error: this droplet doesn't have a floating IP assigned to it."
@cameronelliott
cameronelliott / janus gateway sfu with https on digital ocean using caddy.txt
Created July 13, 2022 00:12
janus gateway sfu with https on digital ocean using caddy.txt
# http://duckdns.org
# https://github.com/RSATom/janus-gateway-snap
snap install janus-gateway
systemctl status snap.janus-gateway.janus-gateway.service
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
#include <mach/port.h> /* mach_port_t */
#include <mach/mach.h> /* mach_port_allocate(), mach_task_self(), mach_port_insert_member(), MACH_PORT_RIGHT_PORT_SET */
#include <sys/event.h> /* kqueue(), kevent64(), struct kevent64_s, EVFILT_MACHPORT, EV_SET64, EV_ADD */
#include <sys/time.h> /* struct timespec */
//#include <dispatch/private.h>
extern mach_port_t _dispatch_get_main_queue_port_4CF(void);
extern void _dispatch_main_queue_callback_4CF(void);
#include <stdio.h>
@cameronelliott
cameronelliott / doc-ops-consulting-agreement.adoc
Created February 17, 2022 07:26 — forked from briandominick/doc-ops-consulting-agreement.adoc
Sample DocOps Consulting Agreement (Prime Source)

Documentation Engineering Consulting Agreement

@cameronelliott
cameronelliott / README.md
Created December 13, 2021 22:04 — forked from tmiller/README.md
A very simple example of using a map of channels for pub/sub in go.
@cameronelliott
cameronelliott / gist:c820b1ec72fe69dd9f36d5b7ed911aff
Last active November 3, 2021 20:15
Docker kill all, rm all containers, all images, for Fish shell
docker kill (docker ps -q)
docker rm (docker ps -a -q)
docker rmi (docker images -q)
# three commands above do
# stop all containers:
# remove all containers
# remove all docker images
@cameronelliott
cameronelliott / gist:cf96261fdb61d9da4075c44b10cc4aba
Created September 1, 2021 23:58
nice go dockerfile starter
# builder image
FROM golang:1.13-alpine3.11 as builder
RUN mkdir /build
ADD *.go /build/
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -o golang-memtest .
# generate clean, final image for end users
FROM alpine:3.11.3
@cameronelliott
cameronelliott / log.txt
Last active August 25, 2021 20:44
private_networking = false, is ignored
c@macmini ~/D/t/d/bug> terraform apply -var "do_token=$DIGITALOCEAN_ACCESS_TOKEN" -var "pvt_key=$HOME/.ssh/id_rsa" -auto-approve
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# digitalocean_droplet.www-1 will be created
+ resource "digitalocean_droplet" "www-1" {
+ backups = false