Skip to content

Instantly share code, notes, and snippets.

@shenghaoyang
shenghaoyang / blueEnable_ALARM_non_mainline.md
Last active February 19, 2024 00:14
Bluetooth support on Raspberry Pis running Arch Linux ARM with non-mainline kernel.

#1 Update: Recent Rapsberry Pi (downstream) kernel dt-overlays now exposes a config option "krnbt" that negates the need for all this.

Relevant PRs: raspberrypi/linux#3682

Enabling bluetooth

[Pi 3B (Non-Plus) / Pi Zero W ONLY]

As of kernel package, linux-raspberrypi-4.14.59-1, support for notifying the kernel of the

@Pindar
Pindar / README.md
Last active February 13, 2023 21:23 — forked from mill1000/README.md
Headless A2DP Audio Streaming on Raspbian Stretch

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date

Prerequisites

@jamesstout
jamesstout / overcast.opml
Created April 22, 2018 09:23
Example OPML file from Overcast, note: it contains usernames and passwords in the feed URL
<?xml version="1.0"?>
<!-- example OPML file -->
<opml version="1.0">
<head>
<title>Overcast Podcast Subscriptions</title>
</head>
<body>
<outline type="rss" text="Richard Herring's Leicester Square Theatre Podcast" title="Richard Herring's Leicester Square Theatre Podcast" xmlUrl="http://feeds.feedburner.com/RichardHerringLSTPodcast" htmlUrl="https://www.comedy.co.uk/podcasts/richard_herring_lst_podcast/"/>
<outline type="rss" text="5by5 at the Movies" title="5by5 at the Movies" xmlUrl="http://feeds.5by5.tv/movies" htmlUrl="http://5by5.tv/movies"/>
<outline type="rss" text="TV Talk Machine" title="TV Talk Machine" xmlUrl="http://feeds.theincomparable.com/tvtm" htmlUrl="https://www.theincomparable.com/tvtm/"/>
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-uboot-3.7.0-armhf.tar.gz
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-minirootfs-3.7.0-armhf.tar.gz
qemu-img create -f raw sd.img 512M
sudo losetup /dev/loop0 sd.img
sudo kpartx -av /dev/loop0
lsblk
sudo mkfs.ext4 /dev/mapper/loop0p1
mount -t ext4 /dev/mapper/loop0p1 /mnt
@ladinu
ladinu / encryptedNixos.md
Last active March 1, 2024 07:19
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
@Aldarone
Aldarone / PKGBUILD
Created September 14, 2017 15:11
Building Signal Electron for Arch
# Maintainer: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Alda <alda@leetchee.fr>
pkgname=signal
pkgver=1.0.24
pkgrel=1
license=('GPL3')
pkgdesc='Signal Private Messenger for the Desktop'
depends=('electron')
@kafene
kafene / pulseaudio-systemd-user.md
Created May 18, 2017 08:00
Pulseaudio via systemd --user

~/.config/systemd/user/pulseaudio.service:

[Unit]
Description=Pulseaudio Sound Service
Requires=pulseaudio.socket

[Service]
Type=notify
ExecStart=/usr/bin/pulseaudio --verbose --daemonize=no
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active March 29, 2024 14:12
LVM on LUKS Arch installation with systemd-boot
@hkoba
hkoba / sched-reboot.service
Last active November 6, 2023 16:07
systemd service and timer for scheduled reboot.
[Unit]
Description=Scheduled Reboot
[Service]
Type=simple
ExecStart=/usr/bin/systemctl --force reboot
@Lirt
Lirt / interfaces.sh
Last active August 8, 2023 07:15
Useful things with linux networking
# Debian default gateway /etc/network/interfaces
up route add default gw 62.210.123.1
# Force interface eth0 to 10 Gbit speed
ethtool -s <device> speed 10000 duplex full autoneg off
# For the setting to be persistent across reboots
# edit "/etc/udev/rules.d/71-ethtool.rules"ff and
# add "SUBSYSTEM=="net", ACTION=="add", NAME=="<device>", RUN+="/sbin/ethtool <device> -s speed 100 duplex full autoneg off"