Skip to content

Instantly share code, notes, and snippets.

View cameronelliott's full-sized avatar

Cameron Elliott cameronelliott

View GitHub Profile
@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
apiVersion: v1
kind: Pod
metadata:
name: deadsfu-in
spec:
hostNetwork: true
containers:
- name: deadsfu
image: x186k/deadsfu:latest
command: ["/app/main"]
@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
@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 / How-to for bundling async-mqtt for the browser.md
Last active December 7, 2020 05:08
This gist explains one way to create a JS browser bundle for async-mqtt

How-to on bundling async-mqtt for the browser

mkdir foo
cd foo
npm install async-mqtt
npm install browserify
npm install tinyify
cd node_modules/async-mqtt/
npm install .
@cameronelliott
cameronelliott / wsstomp.go
Created November 6, 2020 09:37 — forked from SoMuchForSubtlety/wsstomp.go
go-stomp websocket ReadWriteCloser
package wsstomp
import (
"io"
"github.com/gorilla/websocket"
)
type WebsocketSTOMP struct {
connection *websocket.Conn
@cameronelliott
cameronelliott / redis.service
Last active February 5, 2020 06:23 — forked from sshymko/redis.service
Redis service for systemd on Linux
# Redis for Coturn systemd file
#
# Credit to the giants before me.
#
# apparently comments are allowed on recent versions of systemd, ala ubuntu 18.04+
#
# the timeout and tcp-keepalive flags are per coturn recommendations,
# but really would seem to be most helpful in WAN/Internet scenarios
# see: https://github.com/coturn/coturn/blob/master/turndb/schema.stats.redis
#
@cameronelliott
cameronelliott / build_wireshark.sh
Last active January 4, 2020 05:22 — forked from syneart/build_wireshark.sh
BUILD WIRESHARK ON UBUNTU OR DEBIAN
#!/bin/sh
#######################################
# BUILD WIRESHARK ON UBUNTU OR DEBIAN #
#######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |------------------------------------------------------|
# | OS | Wireshark | Test | Last test |
# |----------------|----------------|------|-------------|
# | Ubuntu 18.04.1 | Commit:8beab04 | OK | 20 Nov 2018 |
@cameronelliott
cameronelliott / symantec-vip-access-totp.md
Created December 12, 2019 07:40 — forked from jarbro/symantec-vip-access-totp.md
Generate Symantec VIP Access Token as TOTP

Generate Symantec VIP Access Token as OTP

Recently I came across a web service that required two-factor authentication using the Symantec VIP Access App. I already manage all of my OTP tokens in a different app (If you are on iOS I highly recommend using OTP Auth by Roland Moers.) and did not want to have to use yet another app to generate the TOTP.

There is a way to generate a Symantec VIP Access compatible token very easily if you have access to an environment which can run Python PIP. I happen to have Ubuntu Windows Subsystem Linux running on my machine. (If you are running Windows 10 and don't have this you should really check it out.) Let's get started...

hello

Instructions

Here we install python3-pip and qrencode so we can generate our secret, I