Skip to content

Instantly share code, notes, and snippets.

View sreimers's full-sized avatar

Sebastian Reimers sreimers

View GitHub Profile
#!/bin/bash
# Minimize default rasbian wheezy image (remove desktop stuff etc.)
apt-get -y remove aspell desktop-base desktop-file-utils dictionaries-common dillo fonts-droid fonts-freefont-ttf fontconfig fontconfig-config galculator gnome-icon-theme gnome-themes-standard gpicview gsettings-desktop-schemas gsfonts gsfonts-x11 hicolor-icon-theme leafpad lightdm lightdm-gtk-greeter lxappearance lxde lxde-common lxde-core lxde-icon-theme lxmenu-data midori mime-support openbox omxplayer penguinspuzzle x11-common wpagui python3 python3-minimal python-pygame x11-common
# Upgrade packages
apt-get update
apt-get -y upgrade
# Install required packages
@sreimers
sreimers / podlove-raspberry-online-cleanup.sh
Last active December 17, 2015 22:49
Cleanup my dev env for imaging
#!/bin/bash
rm -Rf /root/.rpi-firmware
rm -Rf /opt/podlove/.ssh
rm -Rf /opt/podlove/www
rm -Rf /root/.baresip
rm -Rf /opt/podlove/.baresip
rm -Rf /home/pi/.baresip
# Clone current Version
@sreimers
sreimers / lsusb_verbose.txt
Created July 7, 2013 08:46
Raspberry USB Debug
Bus 003 Device 002: ID 14ed:29b6 Shure Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
@sreimers
sreimers / gist:5943053
Created July 7, 2013 10:33
Python Check IPv6 IP
import socket
def check_ipv6(n):
try:
socket.inet_pton(socket.AF_INET6, n)
return True
except socket.error:
return False
print check_ipv6('::1') # True
@sreimers
sreimers / gstreamer.py
Created July 8, 2013 20:35
Gstreamer 1.0 Python Debug
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
Gst.debug_set_active(True)
Gst.debug_set_default_threshold(3)
GObject.threads_init()
Gst.init(None)
@sreimers
sreimers / System info
Last active August 29, 2015 13:55
Baresip underrun bug
--- System info: ---
Machine: x86_64/linux
Version: 0.4.10 (libre v0.4.7)
Build: 64-bit little endian
Kernel: Linux studio-connect-d41d 3.12.9-1-ARCH #1 SMP PREEMPT Sun Jan 26 09:01:37 CET 2014 x86_64
Uptime: 16 mins 38 secs
Started: Sun Feb 2 11:38:31 2014
Compiler: 4.8.2 20131219 (prerelease)
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
@sreimers
sreimers / CLIENT (BBB)
Last active April 10, 2018 04:53
g_audio beaglebone black debugging
[root@studio-connect-ad8356 studio]# uname -a
Linux studio-connect-ad8356 3.14.4-1-ARCH #1 SMP Sun May 18 18:32:31 MDT 2014 armv7l GNU/Linux
[root@studio-connect-ad8356 studio]# modprobe g_audio
[ 39.787200] udc musb-hdrc.0.auto: registering UDC driver [g_audio]
[ 39.787252] g_audio gadget: adding config #1 'Linux USB Audio Gadget'/bf109398
[ 39.787271] g_audio gadget: adding 'uac2_func'/db21e410 to config 'Linux USB Audio Gadget'/bf109398
[ 39.792063] g_audio gadget: cfg 1/bf109398 speeds: high full
[ 39.792086] g_audio gadget: interface 0 = uac2_func/db21e410
[ 39.792095] g_audio gadget: interface 1 = uac2_func/db21e410
@sreimers
sreimers / 3.15.0-rc3
Last active August 29, 2015 14:02
Kernel bug musb dma
[ 376.528886] retire_playback_urb: 824 callbacks suppressed
[ 378.354916] ------------[ cut here ]------------
[ 378.359805] WARNING: CPU: 0 PID: 317 at drivers/dma/cppi41.c:612 cppi41_dma_control+0x2ac/0x2d8()
[ 378.369070] Modules linked in:
[ 378.372282] CPU: 0 PID: 317 Comm: aplay Not tainted 3.15.0-rc3 #3
[ 378.378686] [<c0013950>] (unwind_backtrace) from [<c00116a4>] (show_stack+0x10/0x14)
[ 378.386790] [<c00116a4>] (show_stack) from [<c0036df4>] (warn_slowpath_common+0x6c/0x84)
[ 378.395248] [<c0036df4>] (warn_slowpath_common) from [<c0036ea8>] (warn_slowpath_null+0x1c/0x24)
[ 378.404430] [<c0036ea8>] (warn_slowpath_null) from [<c02bbb48>] (cppi41_dma_control+0x2ac/0x2d8)
[ 378.413624] [<c02bbb48>] (cppi41_dma_control) from [<c0380544>] (cppi41_dma_channel_abort+0xcc/0x140)
#include <stdio.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>