Skip to content

Instantly share code, notes, and snippets.

View pavelrevak's full-sized avatar

Pavel Revak pavelrevak

  • Slovakia
View GitHub Profile
@jimdigriz
jimdigriz / debian-unifi.md
Last active April 3, 2024 18:27
Self-Hosting a UniFi Network Server on Debian "bookworm" 12

These instructions have been adapted from the official docs and avoid you have to run any lengthy scripts but you should still be able to get up and running within five minutes or so.

N.B. since the release of 7.5.x and 8.x there are no longer 32 bit releases (so no armhf) but someone noticed that the packages are architechiture neutral (ie. all) in amd64 so you can just pretend to be amd64 on arm64. When doing this, after the update you will still need to do the snappy fix described below.

I am targetting ARM64 but if you are using x86_64 (aka AMD64/amd64) then you should replace all occurances of arm64 (and armhf) with amd64.

Plumb in the Unifi packaging by running:

sudo curl -o /usr/share/keyrings/unifi-repo.gpg https://dl.ui.com/unifi/

@cslarsen
cslarsen / sendeth.py
Created April 27, 2014 07:14
One way of sending raw Ethernet packets in Python
"""Demonstrates how to construct and send raw Ethernet packets on the
network.
You probably need root privs to be able to bind to the network interface,
e.g.:
$ sudo python sendeth.py
"""
from socket import *
@wilem
wilem / fft
Last active March 28, 2022 08:54
FFT(Fast Fourier Transformation algorithm in Python)
import math
def complex_dft(xr, xi, n):
pi = 3.141592653589793
rex = [0] * n
imx = [0] * n
for k in range(0, n): # exclude n
rex[k] = 0
imx[k] = 0
for k in range(0, n): # for each value in freq domain