Skip to content

Instantly share code, notes, and snippets.

View xarinatan's full-sized avatar

Alex xarinatan

  • The netherlands
View GitHub Profile
@xarinatan
xarinatan / networked pulseaudio.md
Last active September 1, 2024 14:29
How to set up PulseAudio over Network

How to set up PulseAudio over Network

PulseAudio actually has great networking capabilities. Especially when combined with Avahi/Zeroconf it is especially easy to set up, though technically it should also be possible without.

Setting up the server

  • Open /etc/pulseaudio/default.pa
  • At the end of the file, add load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.254.0/24 auth-anonymous=1 to activate networked audio from 192.168.254.0-255 without needing authentication.
  • Kill pulseaudio, it should be auto-restarted, or restart your login session to activate the changes. You should now be able to set PULSE_SERVER=192.168.254.XXX and have the remote audio working! If not check the firewall settings, PulseAudio seems to open a random port by default.

Setting up automatic configuration and discovery

  • On both the server and client, install pulseaudio-module-zeroconf and avahi, then after installing make sure Avahi always runs by running systemctl enable --now avahi-daemon
@xarinatan
xarinatan / bedshift-nightshift.sh
Last active July 2, 2018 23:31
Same as bedshift.sh, but with a curve for night shifts.
#/bin/bash
#This bash file will run in a loop until killed, and edit the color temperature throughout the day based on the times below.
while true; do
curTime=$(date +"%k")
if (( $curTime >= 9 && $curTime < 18 )); then #between 9am and 6pm
redshift -O 2500k #Bed time for night shifters
elif (( $curTime >= 18 && $curTime < 21 )); then
@xarinatan
xarinatan / howto.md
Last active August 27, 2024 00:15
How to root your Huawei Mediapad T1-701w

How to root a Huawei Mediapad T1-701(w)

Note: you will need to unlock the device, which voids your warranty.

Prerequisites

Download this package that already contains everything

OR

Download all of the below, and put the mann1 and rooted_boot.img in the platform-tools folder from the ADB Platform Tools package.

@xarinatan
xarinatan / bedshift.sh
Last active March 10, 2018 08:09
Bash script to manage Redshift with 5 different zones
#/bin/bash
#This bash file will run in a loop until killed, and edit the color temperature throughout the day based on the times below.
while true; do
curTime=$(date +"%k")
if (( $curTime >= 9 && $curTime < 18 )); then #between 9am and 6pm
redshift -x #Reset all settings
elif (( $curTime >= 18 && $curTime < 21 )); then
@xarinatan
xarinatan / Wireguard howto.md
Last active August 14, 2018 21:33
Quick howto and some useful links for setting up Wireguard VPN
  • Install wireguard if required.
  • wg genkey | tee wgprivatekey | wg pubkey > wgpublickey
  • note your private key is along with the public key in the folder you just executed the above commands in.
  • grab the generated privatekey and put it at the logical place with the rest of this config in /etc/wireguard/someinterface.conf
[Interface]
PrivateKey = PRIVKEYHERE
ListenPort = SOMEPORT
Address = LOCALVPNADDRESS/SUBNET