Skip to content

Instantly share code, notes, and snippets.

@KonradIT
KonradIT / readme.md
Last active September 25, 2023 01:55
GoPro Studio for Linux
@telent
telent / polar.rb
Created April 26, 2012 15:35
Interface with a polar bluetooth hrm from ruby (linux)
require 'pp'
require 'socket'
module BluetoothPolarHrm
AF_BLUETOOTH=31 # these are correct for the Linux Bluez stack
BTPROTO_RFCOMM=3
class << self
def connect_bt address_str,channel=1
bytes=address_str.split(/:/).map {|x| x.to_i(16) }
s=Socket.new(AF_BLUETOOTH, :STREAM, BTPROTO_RFCOMM)
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())