Skip to content

Instantly share code, notes, and snippets.

View cameronelliott's full-sized avatar

Cameron Elliott cameronelliott

View GitHub Profile
@cameronelliott
cameronelliott / Dockerfile
Created December 9, 2020 13:03 — forked from manifest/Dockerfile
Setting up development environment for MQTT transport of Janus Gateway
FROM ubuntu:16.04
## -----------------------------------------------------------------------------
## Installing dependencies
## -----------------------------------------------------------------------------
RUN set -xe \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
software-properties-common \
apt-transport-https \
@cameronelliott
cameronelliott / gstreamer.cli
Created January 13, 2021 21:22 — forked from vr000m/gstreamer.cli
gstreamer cli
YUV -> MP4
gst-launch filesrc location=<YUV file name> ! videoparse height=144 width=176 framerate=15 ! x264enc name=encoder byte-stream=true bitrate=64 ! mp4mux ! filesink location=<mp4 file name>
gst-launch filesrc location=foreman15_600.yuv ! videoparse height=144 width=176 framerate=15 ! x264enc name=encoder byte-stream=true bitrate=64 ! rtph264pay name=packetiser ! fakesink
MP4 -> YUV
gst-launch filesrc location=<MP4 file name> ! qtdemux ! ffdec_h264 ! videoparse height=144 width=176 framerate=15 ! filesink locatiion=<YUV file name>
----
Stream MP4 file
gst-launch filesrc location=IM2-YT-2_128k_20.mp4 ! qtdemux ! rtph264pay seqnum-offset=0 timestamp-offset=0 ssrc=0xaaaabbbb mtu=1450 perfect-rtptime=true ! udpsink clients=172.16.183.134:4400
apiVersion: v1
kind: Pod
metadata:
name: deadsfu-in
spec:
hostNetwork: true
containers:
- name: deadsfu
image: x186k/deadsfu:latest
command: ["/app/main"]
@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
@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 / 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 / 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 / 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

#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 / 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