This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from bleak import BleakScanner, BleakClient | |
from bleak.backends.characteristic import BleakGATTCharacteristic | |
ADDRESS = "70:CB:0D:D0:34:1C" | |
MODEL_NBR_UUID = "2A24" | |
UART_SERVICE_UUID = "6E40FFF0-B5A3-F393-E0A9-E50E24DCCA9E" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
A lil script to put files on https://cdn.tahnok.ca for use in blog posts or sharing or whatever | |
Accepts either a path or a URL. | |
If the filename is longer than 40 characters, make a random UUID based on the filename | |
Depends on wget and scp | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Python 3.7+ script to download episodes of radio three sixty | |
Reads from radiothreesixtyacc.xml, a copy of the iTunes RSS feed. Fetched from archive.org | |
Episodes are saved in a '$EP_NUMBER - Radio Three Sixty $SHOW_TITLE.m4a' format | |
Metadata about the files are written to manifest. This includes: | |
- show title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
RFM9x to influxdb bridge | |
Learn Guide: https://learn.adafruit.com/lora-and-lorawan-for-raspberry-pi | |
""" | |
import struct | |
import board | |
import busio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
RFM9x to influxdb bridge | |
Learn Guide: https://learn.adafruit.com/lora-and-lorawan-for-raspberry-pi | |
""" | |
import struct | |
import board | |
import busio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
import requests | |
raw = requests.get("http://www.threesixtyrecords.net/podcasts/radiothreesixtyacc.xml").content | |
root = ET.fromstring(raw) | |
urls = [item.find('enclosure').get('url') for item in root[0].findall('item')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SD.h> | |
const int sdChipSelect = 10; | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
if (!SD.begin(sdChipSelect)) { | |
while(1) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOLEAN toggle = TRUE; | |
UWORD y = 0; | |
UWORD x = 0; | |
void loop() | |
{ | |
for (x = 0; x != WIDTH; x++) | |
{ | |
for (y = 0; y != HEIGHT; y++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import json | |
import os | |
user = "tahnok" #replace me | |
backup_path = "/home/wes/github_backups" #and replace me | |
repos = json.load(urllib2.urlopen("https://api.github.com/users/%s/repos?per_page=100" % user)) | |
for repo in repos: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendEmail(to) { | |
var formLink = FormApp.getActiveForm().getPublishedUrl(); | |
var subject = "Makerspace Inventory"; | |
var htmlBody = "Please fill out <a href=" + formLink + ">this form</a>"; | |
MailApp.sendEmail({ | |
to: to, | |
subject: subject, | |
htmlBody: htmlBody | |
}); | |
} |
NewerOlder