mkdir foo
cd foo
npm install async-mqtt
npm install browserify
npm install tinyify
cd node_modules/async-mqtt/
npm install .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: deadsfu-in | |
spec: | |
hostNetwork: true | |
containers: | |
- name: deadsfu | |
image: x186k/deadsfu:latest | |
command: ["/app/main"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package wsstomp | |
import ( | |
"io" | |
"github.com/gorilla/websocket" | |
) | |
type WebsocketSTOMP struct { | |
connection *websocket.Conn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
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...
Here we install python3-pip and qrencode so we can generate our secret, I