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 / sharppcap.bpf.linq
Last active August 31, 2016 23:32
Sharppcap Live Packet filtering using BPF
var devices = CaptureDeviceList.Instance;
devices.Select (z=>z.Description).Dump();
WinPcapDevice d = (WinPcapDevice )devices.First(z=>z.Description.Contains("Ethernet"));
d.Open(SharpPcap.WinPcap.OpenFlags.NoCaptureLocal,0);
d.Filter="port 80";
WinPcapDevice.GetSequence(d).Take(10).Dump();
@cameronelliott
cameronelliott / howto.txt
Last active December 8, 2018 22:00
Install postgres 11.1 on windows with crc on blocks
unzip postgresql-11.1-1-windows-x64-binaries.zip to \ which leaves pgsql in root
cd \pgsql\bin
mkdir \pgsql\data
mkdir \pgsql\log
initdb -k -U postgres -A password -E utf8 -W -D \pgsql\data
# as administrator
\pgsql\bin\pg_ctl.exe register -N "postgresql" -U "NT AUTHORITY\NetworkService" -D "\pgsql\data" -l "\pgsql\log\pgsql.log" -w
# maybe helpful to fix perms

Addsearch http://addsearch.com $25+ per month

AWS CloudSearch (AWS | Amazon CloudSearch - Search Service in the Cloud)

Azure Search (Azure Search - Cloud Search Service | Microsoft Azure)

Cludo (https://www.cludo.com) (199$ per month)

Elasticsearch: RESTful, Distributed Search & Analytics (open source)

@cameronelliott
cameronelliott / turnutils_uclient.md
Last active January 15, 2024 13:31
Tutorial for turnutils_uclient and Coturn server

Tutorial for turnutils_uclient and Coturn server

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