Skip to content

Instantly share code, notes, and snippets.

View kshaa's full-sized avatar

Krišjānis Veinbahs kshaa

View GitHub Profile

Digilent Adept utils on RPI 4 B w/ Ubuntu

  1. To get the djtgcfg tool, use official sources Note: I understand nothing about RPI and the CPU architectures involved, but the "ARM Raspberry Pi" does not work, the ARMHF architecture is expected which is not what RPI4B is. Just use the regular Linux ARM 64 bit .deb for RPI4B w/ Ubuntu
  2. For some reason the /dev/ttyUSB* and /dev/serial/by-id/* devices weren't showing up, I forgot the solution, but it can be fixed, I think I tried some first Google results i.e. some modprobe and echo thing.
  3. When the ttyUSB* works, you have to use the djtgcfg tool with root, but some error regarding permissions appears, can be investigated w/ strace. The fix is some sysctl command
@kshaa
kshaa / browser-scalajs-inject.js
Last active July 26, 2022 08:18
An example of a bootstrap JS script to inject Scala.js on any page load using browser extensions
// You can inject any Scala.js component into any page using Chrome as follows:
// - This example references an arbitrary Scala.js package called bo-search
// - bo-search contains a top level definition BoSearch.initCit
// - Install CORS Unblock extension
// - Install Custom Style Script or Scripty extension
// - Disable CORS for the page
// - Setup a local web server to host this injection script
// - Use this script to inject the component into the page
var baseURL = "http://127.0.0.1:8080"
var injectUrl = baseURL + "/inject.js" // You can even just inject this URL