Skip to content

Instantly share code, notes, and snippets.

@anikishov
anikishov / gist:d7604e88c7dd9f0841ec19b07bc06bac
Last active February 26, 2020 21:23
auth_backend & insert ads
Hi,
For configuring auth_backend & inserting ads on PHP needed to use web server, for example, nginx
# install php and nginx
apt update
apt install nginx php7.2-fpm
# turn on socket listening in php-fpm
@anikishov
anikishov / delete_streams.sh
Created July 11, 2019 20:44
watcher api v2
#!/bin/bash
url=$1
api_key=$2
mask=$3
if [ -z $url ] || [ -z $api_key ] || [ -z $mask ]; then
echo "Argument not found: script.sh /*watcher address*/ \$1 /*vsaas-api-key*/ \$2 /*stream filter*/ \$3"
exit 0
else
# enter this when you end the session
import readline
readline.write_history_file('last_session.py')
@anikishov
anikishov / autossh.txt
Last active November 9, 2020 16:07
Autossh systemd service config
Forward web-port (5000) and ssh (22).
systemctl daemon-reload
systemctl enable autossh.service
[Unit]
Description=Auto Reverse SSH
After=network.target auditd.service
[Service]
import sys, json, datetime
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import dates
if len(sys.argv) != 2:
print("Usage: python3", sys.argv[0], "tcpdump_rtmp.json")
sys.exit(1)
with open(sys.argv[1], encoding="utf-8") as file: