Skip to content

Instantly share code, notes, and snippets.

View cameronelliott's full-sized avatar

Cameron Elliott cameronelliott

View GitHub Profile
module Jekyll
module Convertible
def write(dest)
path = destination(dest)
FileUtils.mkdir_p(File.dirname(path))
if File.extname(path).downcase == '.html' then
self.output.strip!
reg = /<\/?pre[^>]*>/i
pres = self.output.scan(reg)
tary = self.output.split(reg)
@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

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