Skip to content

Instantly share code, notes, and snippets.

View hgmiguel's full-sized avatar

Miguel Angel Huerta Gonzalez hgmiguel

View GitHub Profile
@hgmiguel
hgmiguel / bitcoin_wash.sh
Created May 12, 2019 00:53
bitcoin watch with bitso
#!/bin/bash
NUMBER=$1
BTC=$(curl --silent "https://api.bitso.com/v3/ticker/?book=btc_mxn" | jq -r '.payload.last')
echo "$BTC$NUMBER"
echo $BTC
while (( $(echo "$BTC$NUMBER" | bc -l) ))
@hgmiguel
hgmiguel / connect_bluetooth_headphones.sh
Created September 6, 2022 14:40 — forked from egelev/connect_bluetooth_headphones.sh
Connect bluetooth headphones on Ubuntu 18.04
#!/usr/bin/env bash
function get_headphones_index() {
echo $(pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}')
}
function get_headphones_mac_address() {
local temp=$(pacmd list-cards | grep bluez_card -C20 | grep 'device.string' | cut -d' ' -f 3)
temp="${temp%\"}"
temp="${temp#\"}"