Skip to content

Instantly share code, notes, and snippets.

View qtopie's full-sized avatar

qtopie.rw qtopie

  • GuangZhou, China
View GitHub Profile
@qtopie
qtopie / playsound.sh
Last active April 2, 2018 07:34
Play Sound script for raspberry pi connected to XiaoMi bluetooth Echo (using a2dp with pulseaudio)
#!/bin/bash
# Usage:
# bash playsound.sh <AUDIO-FILE>
BLUEZ_MAC='74:A3:4A:0F:AB:D3'
get_a2dp_sink_index(){
index=$(pactl list sinks short | grep ${BLUEZ_MAC//:/_}.a2dp_sink | awk '{print $1}')
echo $index
@qtopie
qtopie / ssh-multi.sh
Last active August 9, 2017 16:18 — forked from dmytro/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
HOSTS=
read_host() {