Skip to content

Instantly share code, notes, and snippets.

View martinsvoboda's full-sized avatar

Martin Svoboda martinsvoboda

  • Prague, Czech Republic
View GitHub Profile
@mill1000
mill1000 / README.md
Last active July 5, 2024 08:18
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 - As of December 2017. Written for Raspbian Stretch & Bluez 5.43

Prerequisites

@tototoshi
tototoshi / rownum.sql
Created December 26, 2012 01:14
Grouped LIMIT in PostgreSQL: show the first N rows for each group
-- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group
-- http://www.postgresql.jp/document/9.2/html/tutorial-window.html
CREATE TABLE empsalary (
depname varchar(10) not null
, empno integer not null
, salary integer not null
);
INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200);
@interfeis
interfeis / jquery-plugin-boilerplate.js
Created July 2, 2012 16:32
jQuery plugin boilerplate
(function($){
$.fn.extend({
//plugin name
pluginName: function(method) {
var methods = {
init : function(options) {
var defaults = {
color: '#333333'
//more default options
@interfeis
interfeis / module.js
Created July 2, 2012 16:31
jQuery module pattern boilerplate
var clientName = window.clientName || {};
(function ($, context) {
// Add the global variables used across the module
var vars = {
variable2 : "test"
};
/*