Skip to content

Instantly share code, notes, and snippets.

View maxrp's full-sized avatar

Max P maxrp

View GitHub Profile
@maxrp
maxrp / covid.sh
Last active March 23, 2020 01:17
ultra basic posix covid stat tracking
#!/bin/sh
URL="https://covidtracking.com/api/us.csv"
get(){
curl -s "${URL}"
}
print_stats(){
awk -F, '/^[1-9]/{
@maxrp
maxrp / bluetooth_speaker_freebsd13.md
Last active August 3, 2024 13:44
Notes on getting audio out of my FreeBSD 13.0-CURRENT laptop over bluetooth to a speaker.

Bluetooth Audio from a Lenovo X220 running FreeBSD 13.0-CURRENT

2020-04-05

The FreeBSD Handbook Bluetooth chapter is, as usual, great but I needed to do a bit more (or perhaps in a more specific way) to get audio from the Broadcom Bluetooth chip in my Lenovo X220 to the Soundblaster Roar SR20 that lives in my kitchen.

/boot/loader.conf

Load the user character device driver cuse and all the netgraph bluetooth modules, this is better done earlier to avoid the annoying (and possibly significant) WARNING: attempt to domain_add(xyz) after domainfinalize() errors at startup.

cuse_load="YES"

ng_ubt_load="YES" # for most USB bluetooth, for others, refer to the handbook

#!/usr/bin/env python
from smtplib import SMTP, SMTPAuthenticationError
from getpass import getuser
if __name__ == '__main__':
server, service_port = "smtp.office365.com", 587
with SMTP(server, port=service_port) as smtp:
print('[+] Attempting a login as a bogus user.')
print(f"[+] connected to server: {server}:{service_port}")