Skip to content

Instantly share code, notes, and snippets.

View gregsonar's full-sized avatar
🐍
trying hard to do things

Gregory Dudnikof gregsonar

🐍
trying hard to do things
View GitHub Profile
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@eduairet
eduairet / blackletter_grid.py
Created June 10, 2020 18:38
Script to generate with DrawBot a grid to practice blackletter calligraphy
'''
Blackletter grid generator
Generador de retícula para letra gótica
-
Eduardo Aire Torres 2020
'''
# Size of your pen / Tamaño de tu pluma
mmPen = 7 # Size in mm / Tamaño en mm
@mbostock
mbostock / .block
Last active October 23, 2019 21:15
Circle Wave
license: gpl-3.0
border: no
redirect: https://observablehq.com/@mbostock/circle-wave
@gbaman
gbaman / HowToOTG.md
Last active May 2, 2024 01:27
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int