Skip to content

Instantly share code, notes, and snippets.

View fberndl's full-sized avatar

Florian Berndl fberndl

View GitHub Profile
@fberndl
fberndl / gist:ab77e104b59d61c69af3dedd650c71e8
Created April 1, 2025 11:00 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
/dts-v1/;
/plugin/;
#include <dt-bindings/input/input.h>
/{
compatible = "brcm,bcm2708";
fragment@0 {
target = <&i2c1>;
@fberndl
fberndl / ubuntu-22-04-setup.sh
Last active October 16, 2023 07:46
Ubuntu 22.04 Setup
#!/bin/bash
DEBIAN_FRONTEND="noninteractive"
sudo apt update
# Yocto 4.2.99
https://docs.yoctoproject.org/ref-manual/system-requirements.html version
sudo apt -yqq install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev python3-subunit mesa-common-dev zstd liblz4-tool file locales
sudo apt -yqq install make python3-pip inkscape texlive-latex-extra
sudo pip3 install sphinx sphinx_rtd_theme pyyaml
@fberndl
fberndl / AccessPointHotspot.sh
Created January 25, 2021 12:35 — forked from venkateshshukla/AccessPointHotspot.sh
Make a access point hotspot in Fedora
#!/bin/bash
#Initial wifi interface configuration
ifconfig wlp8s0 up 10.20.30.1 netmask 255.255.255.0
sleep 2
###########Start dnsmasq, modify if required##########
if [ -z "$(ps -e | grep dnsmasq)" ] then
dnsmasq
fi
###########
@fberndl
fberndl / openwrt_wireless.sh
Created January 19, 2021 15:30 — forked from ruzickap/openwrt_wireless.sh
OpenWrt WiFi configuration tweaks
uci set wireless.radio0.channel=8
uci set wireless.radio0.htmode=HT40-
uci set wireless.radio0.noscan=1
uci set wireless.radio0.bursting=1
uci set wireless.radio0.ff=1
uci set wireless.radio0.compression=1
uci set wireless.radio0.xr=1
uci set wireless.radio0.ar=1
uci set wireless.radio0.txpower=20
@fberndl
fberndl / gen-efi-image.sh
Created October 27, 2020 15:46 — forked from oofnikj/gen-efi-image.sh
Generate OpenWrt 19.07.2 EFI-compatible image
#!/usr/bin/env bash
### UPDATED SCRIPT AVAILABLE AT https://github.com/oofnikj/openwrt-efi-tools ###
# gen-efi-image.sh [DEST_IMG] [EFI_IMG] [SOURCE_IMG]
#
# Generates an EFI-compatible x86-64 disk image for OpenWrt
# by combining the rootfs and kernel from the latest stable release
# with the EFI image available in snapshot since @a6b7c3e.
#
@fberndl
fberndl / sar.md
Last active March 4, 2020 10:45
sar (once per second )

sudo apt-get install sysstat -y

OS ubuntu 19.10

FILE: /etc/cron.d/sysstat

# The first element of the path is a directory where the debian-sa1
# script is located
PATH=/usr/lib/sysstat:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin

# Activity reports every 10 minutes everyday
@fberndl
fberndl / latancy-clock.sh
Last active March 6, 2020 13:13
gst latency-clock ( Gstreamer Latency Measurement)
# install and build
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-0 libgstreamer1.0-dev libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio -y
https://github.com/stb-tester/latency-clock.git
cd latency-clock
make all
export GST_PLUGIN_PATH=/usr/local/lib/
# shit
sudo mv libgsttimeoverlayparse.so /usr/local/lib/
@fberndl
fberndl / mwan3-notes.md
Created February 10, 2020 14:21 — forked from braian87b/mwan3-notes.md
How to get MWAN3 Working Properly on OpenWRT / LEDE

In experience to get a proper working multiple wan configuration using mwan3 starting from scratch you should:

Important: this works well on OpenWRT 15.05.1, on newer versions there was some breaking changes, for example, the wan ifaces have ipv6 capability and now are named with letters ("wan, wanb... , wanc" instead of "wan, wan2... wan3" so wanb6 means 2nd wan ipv6.): https://github.com/openwrt/packages/blob/master/net/mwan3/files/etc/config/mwan3

The official documentation seems to be very detailed and up to date, I recommend reading those first: https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3 but I recommend to give a look at my config file below, since my approach for policyes is very nice.

First of all: Activate conntrack, docs says that is important and neccesary to get MWAN3 work properly, and it is needed to reboot:

@fberndl
fberndl / gist:54e5b2dd59a00aea855ba08316e04979
Created September 20, 2018 11:11 — forked from mattm7n/gist:1405067
Monitor DHCP traffic with tcpdump
# Monitoring on interface eth0
tcpdump -i eth0 -n port 67 and port 68