Skip to content

Instantly share code, notes, and snippets.

View ktemkin's full-sized avatar

Kate Temkin ktemkin

View GitHub Profile
aaaaaaa.bin
baaaaaa.bin
caaaaaa.bin
daaaaaa.bin
eaaaaaa.bin
upgrade.bin
@ktemkin
ktemkin / grc_scale.py
Created November 16, 2019 09:05
quick hack to resize GRC flowgraphs
#!/usr/bin/env python
import sys
import yaml
if len(sys.argv) != 3:
print("flowgraph scaler for demos on different-DPI machines")
print(">>> hey, kate, why don't you just fix this in GRC?")
print()
print("usage: {} <flowgraph> <scale-factor>\n".format(sys.argv[0]))

Blog post FPGAs:

  • ecp5
    • OrangeCrab
    • TinyFPGA Ex
    • Colorlite 5A-57B
    • LUNA
    • Camlink / Camlink 4K
  • GreatFET Foxglove (?)
@ktemkin
ktemkin / push_to_talk.py
Created April 1, 2020 22:49
GreatFET-based push to talk button
#
# This file is part of LUNA.
#
import asyncio
import logging
from greatfet import GreatFET
from facedancer import main
# Devices would be created by providing a core set of necessary
# information (e.g. PHY connections, clock domains, etc).
device = USBSuperSpeedDevice(pipe_bus=phy_connection, [...])
m.submodules.usb_controller = device
# Create hardware to handle standard requests on ep0. This object
# would provide methods for attaching e.g. class / vendor request handlers.
ep0 = device.create_control_endpoint(descriptors=my_descriptors)
# Endpoints will be added by calling factory methods that will
#!/usr/bin/env python2.7
# public domain-y, Kate Temkin, 2015
import asyncore
import evdev
import signal
import re
#Stores the product names for each device which can be used as a vim-clutch.
COMPATIBLE_NAME_REGEX = "RDing FootSwitch.*";
@ktemkin
ktemkin / lamp-control.py
Created November 18, 2020 00:24
Working mockup for controlling a JOOFOO lamp with the YS1.
#!/usr/bin/env python3
"""
Silly YS1 mockup of an interface for the JOOFOO remote-controlled lamp.
"""
import sys
import argparse
# Normally, we'd just import *, but rfcat likes to do things like export functions called str(),
# so we'll be a bit more selective.
-- Get the basic systems we'll want to work with.
player = Game.GetPlayer()
scriptables = Game.GetScriptableSystemsContainer()
transaction = Game.GetTransactionSystem()
equipment = scriptables:Get(CName.new("EquipmentSystem"))
-- Get data for the player.
player_data = equipment:GetPlayerData(player)
-- Hack: we need the second internal entry with the same name; so we'll create our own entry pointing to the new function.
@ktemkin
ktemkin / set_gerrit_font.js
Last active November 11, 2021 06:25
user script body to set Gerrit fonts
// ==UserScript==
// @name Gerrit Fonts
// @namespace https://gerrit.YOURDOMAINHERE.com
// @match https://gerrit.YOURDOMAINHERE.com/*
// ==/UserScript==
'use strict';
(function() {
@ktemkin
ktemkin / default.nix
Last active August 23, 2024 17:38
scopehal derivation + dependencies
#
# scopehal apps, including glscopeclient and optionally ngscopeclient
#
# vim: et:ts=2:sw=2:
#
{ pkgs, lib, cmake, pkg-config, patchelf, ... }:
let
ffts = (pkgs.callPackage ./ffts.nix { });
vulkan-sdk = (pkgs.callPackage ./vulkan-sdk.nix { });
in