Skip to content

Instantly share code, notes, and snippets.

View wolkenarchitekt's full-sized avatar

Ingo Weinmann wolkenarchitekt

View GitHub Profile
@wolkenarchitekt
wolkenarchitekt / ffmpeg-build.sh
Last active February 5, 2024 11:21 — forked from peerasan/ffmpeg-build.sh
Build FFmpeg
# Based on: https://gist.github.com/peerasan/8ee6df7df6ed764c606f99d245e74211
set -euxo pipefail
BUILD_DIR="/usr/local/src/ffmpeg"
BIN_DIR="$HOME/bin"
mkdir -p ${BUILD_DIR} ${BIN_DIR}
cd "${BUILD_DIR}"
#Require for Compiler
apt-get install -y autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev

I use Ubuntu (20.04 LTS, now 22.04 LTS) as my main operating system. Some background on switching from OS X to Ubuntu here: https://github.com/bjohas/Ubuntu-keyboard-map-like-OS-X. I don't really use Windows at all, and I am surprised with how the intial setup of Windows has gone wrong for some of my friends (missing dlls, etc etc). However, there are a few 'OS X / Windows only things' and with a larger SSD on a new laptop, I thought I'd preserve Windows. E.g., 'OS X / Windows only things' include Adobe Creative Suite, as well as using Oculus/Meta Quest 2 via a PC connection.

Dual booting Ubuntu and Windows with encryption (for Ubuntu 22.04 LTS)

I used these instructions to dual-boot-ubuntu-and-windows-with-encryption.md https://www.mikekasberg.com/blog/2020/04/08/dual-boot-ubuntu-and-windows-with-encryption.html

Dual-booting with encrypted storage should not be this hard in 2020 2022.

@wolkenarchitekt
wolkenarchitekt / gist:2c43e4e1b6f6091bbff122c7378e8535
Created April 6, 2022 11:50
Build 8812au drivers (e.g. Asus AC-56) for Raspberry Pi OS (e.g. Kernel 5.10.92-v8+)
#
# Install drivers for 8812au devices.
# Driver builds on http://downloads.fars-robotics.net/wifi-drivers/8812au-drivers/ are outdated and don't support
# Kernel 5.10.92-v8+ in current Raspberri Pi OS.
# This Gist will allow to build the drivers on ALL kernels.
#
# Install required packages
sudo apt-get install -y build-essential flex bison libssl-dev libelf-dev python2 bc git raspberrypi-kernel-headers dkms
@wolkenarchitekt
wolkenarchitekt / flarm_atom_uav_read.py
Last active January 10, 2022 15:53
Read JSON stream from FLARM Atom UAV via serial
# Prerequisites:
# * Install pyserial-asyncio==0.6
# * Add udev-rule for Flarm ATOM UAV, so it will show up as symlink '/dev/ttyUSB-ATOM':
# ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="ttyUSB-ATOM"
#
import asyncio
import json
import logging
from typing import Generator
@wolkenarchitekt
wolkenarchitekt / atom_uav_serial_reader.py
Last active December 8, 2021 20:37
ATOM UAV serial read USB
# Prerequisites:
# pip install pyserial==3.5
# Get USB device ID via lsusb
import serial
# Results in SerialException: Could not configure port: (25, 'Inappropriate ioctl for device')
ser = serial.Serial("/dev/bus/usb/003/014", baudrate=115200, stopbits=serial.STOPBITS_ONE, timeout=1)
@wolkenarchitekt
wolkenarchitekt / Dockerfile
Created August 6, 2021 16:07
PostgreSQL 11 + PostGIS 2.5 running on Raspberry
FROM postgres:11
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-11-postgis-2.5 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /docker-entrypoint-initdb.d
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
COPY ./update-postgis.sh /usr/local/bin
@wolkenarchitekt
wolkenarchitekt / gist:4a525463895f381f9bd7307e97871bc5
Created May 20, 2021 09:33
TR-1F Logging example using pySerial
#!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
import io
import logging
import serial
if __name__ == "__main__":
@wolkenarchitekt
wolkenarchitekt / gist:49f89b65486b4fb681ea89a79a92edcf
Last active February 15, 2021 20:05
Raspberri Pi: Docker vs SystemD services
Advantages Docker:
* Same config for development and production
* Manage dev/prod environment cleanly only via docker-compose files
* No configmanagement necessary - just pass environment variables
Disadvantages Docker:
* Rebuilding images takes long on Raspberry PI
* Building ARM Docker images on non-Raspberry PI build host is complex
* Cannot host private Docker images on docker hub for free - need to run own Docker image hub
@wolkenarchitekt
wolkenarchitekt / raspberry-pi-chroot-armv7-qemu.md
Created January 12, 2021 11:05 — forked from htruong/raspberry-pi-chroot-armv7-qemu.md
Chroot into Raspberry Pi ARMv7 Image with Qemu
# raspbian stretch lite on ubuntu

### You can write the raspbian image onto the sd card,
# boot the pi so it expands the fs, then plug back to your laptop/desktop
# and chroot to it with my script 
# https://gist.github.com/htruong/7df502fb60268eeee5bca21ef3e436eb
# sudo ./chroot-to-pi.sh /dev/sdb
# I found it to be much less of a pain in the ass and more reliable
# than doing the kpartx thing
@wolkenarchitekt
wolkenarchitekt / links.md
Last active August 19, 2020 12:12
Useful programming links (mostly Python, pytest, Django)