Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
internal_name="AT Translated Set 2 Keyboard"
internal_id=$(LANG=C xinput list | grep -i "$internal_name" | egrep -o 'id=[0-9]+' | egrep -o '[0-9]+')
if [ -z "$internal_id" ]; then
echo "Could not find internal keyboard"
else
setxkbmap -device $internal_id -layout gb
# echo "Internal keyboard layout updated"
fi

note: there are unsolved errors with this method - two are described below but I expect more to pop up with further testing. please take this as a warning and follow the steps knowing they're a bit of a bodge!

Compile and run the openFrameworks empty example on a headless Raspberry Pi 3 running Debian Stretch

  1. Create a resinOS device (see guide here) and clone a sample project to your computer e.g. this.

  2. Install modified openFrameworks and its dependencies by replacing the contents of Dockerfile.template with:

# use raspbian stretch image as container base
@itsdsk
itsdsk / install-processing.sh
Last active February 9, 2018 10:57
Processing 3.3.5 armv6hf install script
#!/bin/sh
# This script installs the latest version of Processing for ARM into /usr/local/lib
# Run it like this: "curl https://processing.org/download/install-arm.sh | sudo sh"
# check if on a 64-bit operating system
case "$(file $(which file))" in
*aarch64*) FLAVOR="arm64"; TAR="$(curl -sL https://api.github.com/repos/processing/processing/releases | grep -oh -m 1 'https.*linux-arm64.tgz')" ;;
*) FLAVOR="armv6hf"; TAR="$(curl -sL https://api.github.com/repos/processing/processing/releases | grep -oh -m 1 'https.*linux-armv6hf.tgz')" ;;
esac
@itsdsk
itsdsk / Dockerfile.template
Last active January 29, 2018 18:11
OF RPi headless
# use raspbian stretch image as container base
FROM resin/raspberrypi3-debian:stretch
# install deps
RUN apt-get update && apt-get -y install \
libraspberrypi-dev \
raspberrypi-kernel-headers \
mesa-utils \
libgl1-mesa-glx \
rsync \