Skip to content

Instantly share code, notes, and snippets.

View boulund's full-sized avatar

Fredrik Boulund boulund

View GitHub Profile
@dghodgson
dghodgson / pulseaudio-auto-loopback.py
Last active December 15, 2019 05:29
A python script for automatically adding a loopback module to Pulse Audio for a bluetooth audio source when it's connected, and automatically removing the loopback module when the bluetooth device disconnects.Original code found here: https://gist.github.com/joergschiller/1673341/#comment-802735
#!/usr/bin/python
# based on monitor-bluetooth
# Changes by Domen Puncer <domen@cba.si>
import gobject
import dbus
import dbus.mainloop.glib
import os
@ruxi
ruxi / jointplot_w_hue.py
Last active March 13, 2021 23:39
jointplot_w_hue
__author__ = "lewis.r.liu@gmail.com"
__copyright__ = "Copyright 2020, 2018, https://gist.github.com/ruxi/ff0e9255d74a3c187667627214e1f5fa"
__license__ = "MIT"
__version__ = "0.0.2"
# update: June 13, 2020
# created: Feb 19, 2018
# desc: seaborn jointplot with 'hue'
# prepared for issue: https://github.com/mwaskom/seaborn/issues/365
# resolved (22 Aug 2020): https://github.com/mwaskom/seaborn/pull/2210
@brantfaircloth
brantfaircloth / gist:944741
Created April 27, 2011 17:28
blat blast8 tabular format
text = Query id, Subject id, % identity, alignment length, mismatches, gap openings, q. start, q. end, s. start, s. end, e-value, bit score
csv = "Query id","Subject id","% identity","alignment length","mismatches","gap openings","q. start","q. end","s. start","s. end","e-value","bit score"
@joergschiller
joergschiller / a2dp_sink_ubuntu_linux.md
Created January 24, 2012 23:05
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink: