Skip to content

Instantly share code, notes, and snippets.

View russhughes's full-sized avatar

Russ Hughes russhughes

  • One World Telecommunications
View GitHub Profile
@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active May 16, 2024 20:02
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

A complete list of books, articles, blog posts, videos and neat pages that support Data Fundamentals (H), organised by Unit.

Formatting

If the resource is available online (legally) I have included a link to it. Each entry has symbols following it.

  • ⨕⨕⨕ indicates difficulty/depth, from ⨕ (easy to pick up intro, no background required) through ⨕⨕⨕⨕⨕ (graduate level textbook, maths heavy, expect equations)
  • ⭐ indicates a particularly recommended resource; 🌟 is a very strongly recommended resource and you should look at it.
@LyleScott
LyleScott / rotate_2d_point.py
Last active May 1, 2024 21:26
Rotate X,Y (2D) coordinates around a point or origin in Python
"""
Lyle Scott, III // lyle@ls3.io
Multiple ways to rotate a 2D point around the origin / a point.
Timer benchmark results @ https://gist.github.com/LyleScott/d17e9d314fbe6fc29767d8c5c029c362
"""
from __future__ import print_function
import math
@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@sbright33
sbright33 / stepper2.ino
Created November 30, 2012 20:38
Stepper library for 28BYJ-48
// This Arduino example demonstrates bidirectional operation of a
// 28BYJ-48, which is readily available on eBay for $4.25 inc shipping,
// using a ULN2003 interface board to drive the stepper. The 28BYJ-48
// motor is a 4-phase, 8-beat motor, geared down by a factor of 64. One
// bipolar winding is on motor pins 1,3 and the other on motor pins 2,4.
// Refer to the manufacturer's documentation of Changzhou Fulling
// Motor Co., Ltd., among others. The step angle is 5.625/64 and the
// operating Frequency is 100pps. Current draw is 92mA.
// Vin w USB power is 4.5v too slow for testing use 5v pin.
//#include <Narcoleptic.h>
@0187773933
0187773933 / pdfExtractImages.py
Last active October 9, 2023 17:13
Extract Images From PDF
#!/usr/bin/env python3
import sys
import io
from pprint import pprint
from pathlib import Path
from tqdm import tqdm
from binascii import b2a_hex
import shutil
import tempfile
@samneggs
samneggs / Centipede.py
Created June 28, 2023 14:31
Centipede game on PI Pico in MicroPython
# Centipede
import centi_splash
from lcd_1_8 import LCD_1inch8
import machine
from machine import Pin, PWM
from uctypes import addressof
from time import sleep, ticks_us, ticks_diff, ticks_ms
import gc, _thread, array
@samneggs
samneggs / missile_command.py
Last active February 27, 2023 07:08
Missile Command game in MicroPython on Pi Pico
# Missile Command game
from machine import Pin,SPI,PWM,ADC, Timer, reset, soft_reset
import framebuf, gc
import time, array, _thread
from time import sleep, ticks_us, ticks_diff, ticks_ms
from lcd_1_8 import LCD_1inch8
from random import randint
from sys import exit
@samneggs
samneggs / cave.py
Created January 3, 2023 02:04
Cave Adventure game on Pi Pico in MicroPython and Assembly
# cave
from machine import Pin,SPI,PWM,ADC
import framebuf, gc
import time, array
from time import sleep, ticks_us, ticks_diff
from lcd_1_8 import LCD_1inch8
from random import randint
from sys import exit
import _thread
from uctypes import addressof
@Hermann-SW
Hermann-SW / SerialHttpsClient.ino
Created March 22, 2021 21:46
ESP01 sketch taking HTTPS GET URLs from Pico over serial, returning response to Pico
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClientSecureBearSSL.h>
ESP8266WiFiMulti WiFiMulti;