Skip to content

Instantly share code, notes, and snippets.

View Pindar's full-sized avatar

Simon Dittlmann Pindar

View GitHub Profile
@mill1000
mill1000 / README.md
Last active April 7, 2024 20:32
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

@oleq
oleq / _README.md
Last active January 7, 2024 10:38
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |
@progrium
progrium / consul.py
Last active September 16, 2020 14:29
Consul health check integration with DataDog
import requests
from checks import AgentCheck
class ConsulCheck(AgentCheck):
def should_check(self):
r = requests.get(self.init_config["consul_url"] + "/v1/agent/self")
if r.status_code != 200:
return False
agent = r.json()
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active November 7, 2022 09:11
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@mbabineau
mbabineau / docker-registry.template.json
Last active July 3, 2018 13:34
Docker Registry CloudFormation template (better version here: https://github.com/mbabineau/cloudformation-docker-registry)
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Launches a Docker Registry.",
"Parameters" : {
"InstanceType" : {
"Description" : "EC2 instance type",
"Type" : "String",
"Default" : "m1.small",
@danrigsby
danrigsby / packer-ami-id
Last active December 14, 2023 15:07
Get AMI ID from a packer build
packer build packer.json 2>&1 | sudo tee output.txt
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt
@ingoe
ingoe / gist:11265248
Created April 24, 2014 18:49
window addEventHandler test
describe('window.postMessage test', function() {
var o;
beforeEach(function(done) {
o = {
f: function() {}
};
// won't pass the spec
// window.addEventListener('message', o.f, false);
spyOn(o, 'f').and.callFake(function() {
done();
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@rhenning
rhenning / opsworks_blue_green_deploy_test_long_version
Created February 13, 2014 01:11
AWS OpsWorks full-stack blue/green deploy test
$ aws opsworks describe-stacks
{
"Stacks": [
{
"ServiceRoleArn": "arn:aws:iam::047170177871:role/aws-opsworks-service-role",
"StackId": "575e1389-1df3-427d-99d3-d60f89a41442",
"DefaultRootDeviceType": "ebs",
"Name": "rhenning_test",
"ConfigurationManager": {
"Version": "11.4",
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet