Skip to content

Instantly share code, notes, and snippets.

View andreer's full-sized avatar
🍰
Business as usual

Andreas Eriksen andreer

🍰
Business as usual
View GitHub Profile
@andreer
andreer / lcd.ice
Created February 28, 2019 08:43
Example of TinyFPGA BX output to Hitachi HD44780 controlled character LCD
{
"version": "1.2",
"package": {
"name": "",
"version": "",
"description": "",
"author": "",
"image": ""
},
"design": {
$ for host in `cat VESPA-18531`; do echo $host; d $host openssl x509 -in /var/lib/sia/certs/vespa.vespa.tenant.cert.pem -noout -dates; echo; done
2085117-v6-2.ostk.bm2.prod.ne1.yahoo.com
notBefore=Jul 1 06:50:44 2020 GMT
notAfter=Jul 31 07:50:44 2020 GMT
2088184-v6-2.ostk.bm2.prod.ne1.yahoo.com
notBefore=Jul 1 16:00:23 2020 GMT
notAfter=Jul 31 17:00:23 2020 GMT
le19973-v6-5.ostk.bm2.prod.ne1.yahoo.com
// This is a slightly edited version of uLisp for the Adafruit nrf52840 express board,
// connected to a 4.4 inch 320x240px SHARP memory display.
// It uses the "Adafruit SHARP Memory Display" arduino library - tested with version 1.1.0 only.
// Display was wired using the breakout board as in this [1] tutorial, but I connected the larger
// 4.4 inch LS044Q7DH01 display instead.
// There are way too many calls to tft.refresh() which makes it slow - deciding when to refresh
// is probably better left to the user code.
// WARNING: The screen should be refreshed regularly to avoid image burn-in - see the datasheet.
// [1] https://learn.adafruit.com/diy-rpn-desktop-calculator-with-circuitpython/3d-printing-wiring-assembly
@andreer
andreer / apollo3_ctimer_isr_example.ino
Last active March 17, 2022 01:06
working artemis / apollo3 ctimer interrupt isr example
//
// Author: Andreas Eriksen, heavily based on another CTIMER example by Nic Ivy
// Created: March 17, 2022
// License: MIT
//
// This example demonstrates how to trigger an interrupt using a counter timer
// (i.e. CTIMER) on the Apollo3. The example uses the Ambiq Micro hardware
// abstraction layer provided with the SparkFun Arduino core for their Artemis
// line of microcontrollers.
//

Using WireGuard for transparent encryption

Setting up WireGuard VPN on Linux, without configuring any additional IP addresses

Introduction

I've been setting up WireGuard for Linux server-to-server communication in a possibly novel way - it seems to works well for my specific use case, but I haven't seen any other documentation pointing out that this is possible. So I thought I'd quickly describe what I've been doing.

Difference from a typical WireGuard setup

@andreer
andreer / RankProfileListHandler.java
Created May 7, 2024 13:16
RankProfileListHandler example
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.example;
import com.google.inject.Inject;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.ThreadedHttpRequestHandler;
import com.yahoo.jdisc.Metric;
import com.yahoo.search.schema.SchemaInfo;