Skip to content

Instantly share code, notes, and snippets.

@ozett
ozett / multicast-on-linux.md
Created October 11, 2022 15:21 — forked from PhilipSchmid/multicast-on-linux.md
Testing Multicast Traffic on Linux

Testing Multicast Traffic on Linux

Prerequisites

By default Linux ignores Broadcast and Multicast ICMP messages. That's why you need to enable it first:

sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=0

Join and Test Multicast Traffic

To join any mutlicast address (e.g. 224.10.10.10/24) just add it to your active interface (e.g. eth0) and append the keyword autojoin at the end:

@ozett
ozett / qr.py
Created April 9, 2022 11:05 — forked from jamct/qr.py
import qrcode
def createQr(vwz,iban,bic,recipient,amount,filename="epc_qr"):
# The docs can be found here: https://pypi.org/project/qrcode/
qr = qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_M)
qr.add_data("BCD\n")
qr.add_data("002\n")
qr.add_data("1\n")
qr.add_data("SCT\n")
@ozett
ozett / how-to-restore.md
Created October 31, 2021 09:40 — forked from AmazingTurtle/how-to-restore.md
restore access to unifi controller

Restore access to a unifi controller

When you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.

Warning

Do not uninstall unifi controller - most of the data is not stored in mongodb. In case you thought a mongodb backup would be sufficient, you may have fucked up already, just like me. However I managed to write this "tutorial" for anyone to not run into the same trap.

Steps

@ozett
ozett / git_cheat-sheet.md
Created August 30, 2021 07:05 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
@ozett
ozett / fritzbox-cert-update.sh
Created March 28, 2021 12:10 — forked from wikrie/fritzbox-cert-update.sh
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
## thanks to https://gist.github.com/mahowi for the perfect Idea
## put it in /etc/letsencrypt/renewal-hooks/post so it gets run after every renewal.
# parameters
USERNAME="maybe empty"
PASSWORD="fritzbox-password"
CERTPATH="path to cert eg /etc/letsencrypt/live/domain.tld/"
CERTPASSWORD="cert password if needed"
HOST=http://fritz.box
@ozett
ozett / camera.md
Created September 18, 2020 16:12 — forked from gabonator/camera.md
Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Video stream url for VLC/DVR:

  • rtsp://192.168.1.93:554/user=admin&password=&channel=&stream=.sdp?real_stream--rtp-caching=100

Telnet access

  • telnet 192.168.1.10 23
  • Localhost login: root
  • Password: xmhdipc
@ozett
ozett / backup-github.sh
Created August 12, 2020 08:22 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
@ozett
ozett / sampleREADME.md
Created June 28, 2020 08:22 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@ozett
ozett / get_frozen_graph.py
Created June 26, 2020 06:32 — forked from Tony607/get_frozen_graph.py
How to run TensorFlow Object Detection model on Jetson Nano | DLology
import tensorflow as tf
def get_frozen_graph(graph_file):
"""Read Frozen Graph file from disk."""
with tf.gfile.FastGFile(graph_file, "rb") as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
return graph_def
# The TensorRT inference graph file downloaded from Colab or your local machine.
@ozett
ozett / Install_OpenCV4_CUDA10.md
Created June 21, 2020 11:57 — forked from raulqf/Install_OpenCV4_CUDA12.6_CUDNN8.9.md
How to install OpenCV 4.2 with CUDA 10.0 in Ubuntu 18.04

How to install OpenCV 4.2.0 with CUDA 10.0 in Ubuntu distro 18.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries: