Skip to content

Instantly share code, notes, and snippets.

@0x4C4A
0x4C4A / Auto-connect + auto-re-pair with BluetoothAudio
Last active April 16, 2017 12:48
A script to re-pair with a bluetooth audio receiver, when it's been paired to another device. I use this, to pair/auto-connect on boot.
#!/usr/bin/expect -f
# Runs bluetoothctl and attempts to connect with bluetooth device
# If connection fails, tries to unpair, pair and then connect again
# My specific device apparently can't be paired to multiple hosts, so it needs this
# Change this to whatever your device's bluetooth ID is
set ID "BC:FD:5B:00:14:28"
spawn "bluetoothctl"
@0x4C4A
0x4C4A / RTUCourseNameLookup.py
Created March 13, 2016 20:12
Retrieves course names from Riga Technical University course registry when given an array of valid course codes
### This script retrieves the RTU course names corresponding to the RTU course codes
### Works as of 13.03.16.
### Coded by Linards Jukmanis - 0x4C4A.com
# Needs python, urllib2, cookielib and regular expressions
import urllib2
import cookielib
import re
# Input your course codes